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

Re: make "for x in *$1*" case insensitive?



On 4-Mar-2004 17:46, Peter Stephenson wrote:

zzapper wrote:
If I call the following script with
vvv me
It will not list a file say READ.ME but will list READ.me

function vvv () { for x in *$1*
do
     echo $x
done
}

function vvv() {
 setopt localoptions extended_glob
 local x

 for x in (#i)*$1*
 do
	echo $x
 done
}
It would be nice, though, if zsh had an option to make file globbing case insensitive. I'd enable than on my Cygwin machine, since the Windows file systems basically *are* case insensitive...

(Bash has such an option: nocaseglob...)

– Michael



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