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

Re: newbie's question about completion

On Thu, Nov 08, 2001, Dan Kenigsberg wrote about "Re: newbie's question about completion":
> This is SuSe 7.0 that has setopt recexact in its /etc/zshrc (arghhh).
> My problem had nothing to do with zsh versions..

I don't understand why distributions do this... Zsh has a set of defaults
and these are clearly explained in the manual; If a distribution overrides
this default, it leaves the user clueless why the behavior described in
the manual is not happening. And why do they think that their defaults
make more sense than the defaults decided upon by the zsh developers?

I recommend you send a bug report to SuSe and ask them to remove this
silly setting.

> Recently, I found a truer "bug" in SuSe's startup files: /etc/profile
> sets alias ls='eval /bin/ls $LS_OPTIONS'.
> Appart of the question whether it is sensible to expand $LS_OPTIONS every time
> you do ls, this distroys arguments with spaces. (confession: I do not fully
> understand why)

The "eval" indeed reparses the whole line and rebreaks it on spaces ($IFS,
actually)... What they probably meant to do was to only break LS_OPTIONS,
in which case they should do

	alias ls='\ls ${=LS_OPTIONS}'

(the ${=...} enables SH_WORD_SPLIT for this time only - see the zsh manual.
the \ls is used instead of /bin/ls to find ls wherever it is - not necessarily

Of course, this solution works only in zsh, so it should be placed in
/etc/zprofile, not /etc/profile. Or use the solution you described which
works on any Bourne-like shell.

> (Nadav, it seems I'm following you everywhere..)

Don't you know that I subscribe to every mailing list in existance? :)

Nadav Har'El                        |   Thursday, Nov  8 2001, 22 Heshvan 5762
nyh@xxxxxxxxxxxxxxxxxxx             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Despite the cost of living, have you
http://nadav.harel.org.il           |noticed how it remains so popular?

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