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

Re: Bash to Zsh Funny



> gvim.exe $files &

When you execute this line, $files is one space-separated string.
zsh expands this to only one string and doesn't perform
word-splitting, and that's what you expect most of the time. bash on
the other hand performs word-splitting.

Compare results of:
$ a='b c'
$ for i in $a; do echo $i; done
...in both zsh and bash.

If you want to activate word-splitting in zsh, you can ask for it
specifically for this expansion with ${=var}, or you can setopt
shwordsplit to activate it for all expansions.

You can get more info in the FAQ,
http://zsh.sunsite.dk/FAQ/zshfaq03.html#l17

-- 
J
"- Watashi, DATE-tte hajimete datta no...
 - Sou kai ?
 - Hontou wa suki na hito to surun deshou ?" -- Tokugawa Asuka



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