Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 8-bit patch for zle_tricky.c
- X-seq: zsh-workers 1103
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: schaefer@xxxxxxx
- Subject: Re: 8-bit patch for zle_tricky.c
- Date: Mon, 20 May 1996 20:36:16 +0200 (MET DST)
- Cc: A.Main@xxxxxxxxxxxxxxxxx, zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <960520100350.ZM22705@xxxxxxxxxxxxxxxxxxxxxxx> from Bart Schaefer at "May 20, 96 10:03:49 am"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> } > 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