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

Re: [ -d (#i)Temp ]



On Fri, Apr 10, 2026 at 9:12 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> 2 /aWorking/Zsh/Source/Wk 3 % [[ -d ''(#i)temp(#qN) ]] && echo "it's a directory"
>
> ... so your original is safer.

This version works incorrectly if there is more than one match. See my
previous reply, or try this:

  % mkdir test
  % cd test
  % mkdir Temp temp 'Temp temp'
  % [[ -d ''(#i)temp(#qN) ]] && echo FAIL

Roman




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