Subject: Re: ksh: escape spaces when expanding
To: None <Havard.Eidnes@runit.sintef.no>
From: Jaromir Dolecek <dolecek@ics.muni.cz>
List: tech-userlevel
Date: 09/25/1999 15:30:19
Havard.Eidnes@runit.sintef.no wrote:
> > + /* escape all shell-sensitive characters in the word */
> > + for (add = 0, len = match_len; len - add > 0; add++) {
> > + if (strchr("\\$(){}*&;|<> \t\"'", match[add])) {
>
> How does this work if the user has mucked with IFS? (I don't
> claim to know anything about the surrouding code in the patch or
> what it actually does, so I may be barking up the wrong tree
> here -- just checking whether you've considered it.)
No, I didn't consider it at all. Should those "standard" IFS chars
(\t, space, newline) be not on the list and I should compare
with real contents of IFS ? I probably should ...
Jaromir
--
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.ics.muni.cz/~dolecek/
"The only way how to get rid temptation is to yield to it." -- Oscar Wilde