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

Re: globbing and parameter expansion in 3.0.5



Stefan Monnier wrote:
>/-0% bash -c 'toto="*"; echo $toto'
>System.map amd bin boot cdrom compressed core depots dev dos etc floppy home homes inittab kernel lib lost+found misc mnt net nfs proc root rpm sbin scratch softs tmp usr var windows wine
>/-0% zsh -c 'toto="*"; echo $toto'
>*

% zsh -c 'toto="*"; echo $toto'
*
% zsh -c 'toto="*"; echo $~toto'
bin data etc export man tmp usr
% ARGV0=sh zsh -c 'toto="*"; echo $toto'
bin data etc export man tmp usr
% ARGV0=bash zsh -c 'toto="*"; echo $toto'
bin data etc export man tmp usr

>Which one is "correct" ?

Both.  See GLOB_SUBST in zshoptions(1).

-zefram



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