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

Re: Hi. Installed on FreeBSD 2.1



>	$ ls -l -F			# okay
>	$ A='-l'
>	$ ls $A -F			# okay
>	$ B='-l -F'
>	$ ls $B				# error
>					# BSD ls: "illegal option --"
>					# GNU ls: "invalid option --"

You obviously don't have the SH_WORD_SPLIT option set.  Normally,
Bourne shells will perform word splitting on the result of parameter
expansions, as you rely on here, but zsh doesn't do that by default.
Apart from turning on the option, there are two possible solutions:

B=(-l -F)
ls $B

B='-d -F'
ls $=B

-zefram



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