Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 8-bit patch for zle_tricky.c



> } > Adding it to $IFS has no effect in this matter, because zsh does not do
> } > field splitting on normal words.  (It should, at least if SH_WORD_SPLIT
> } > is set.)
> } 
> } I do not think so.  Neither bash nor ksh93 does this.  Look:
> } 
> } % ksh
> } $ count () { echo $# ; }
> } $ IFS=/
> } $ count as/df/gh
> } 1
> } 
> } SH_WORD_SPLIT only changes the result of substitutions.
> 
> zsh% /bin/sh
> $ IFS=/
> $ echo/bar
> bar
> $ exit/1
> zsh% echo $?
> 1
> zsh%

Yes, the original Bourne Shell used IFS in the lexer to separate words but
I think that this does not conform the POSIX Shell and Utilities standard.
Also it may be a security hole if IFS is exported.  That's why bash and
ksh does not use IFS here, and zsh should not use it either.

Zoltan




Messages sorted by: Reverse Date, Date, Thread, Author