Re: [ -d (#i)Temp ]

Perry Smith <[email protected]> Fri, 10 Apr 2026 12:42:56 -0500
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <[email protected]>
> On Apr 10, 2026, at 12:27, Ray Andrews <[email protected]> wrote:
> 
> Is it possible to do something like this:?
> 
>  [ -d (#i)Temp ] && echo 'it's a directory'
> 
> ... that doesn't work, but you get the idea: I have a directory 'temp' and I'm wanting the above test to succeed.  As with wildcards, even if it did make a match, I'd expect it to fail if there's more than one match of course.  I'm betting this is doable.

pedz@peace:s000 foo % mkdir aa ab ac
pedz@peace:s000 foo % [[ -d aa ]] && echo hi
hi
pedz@peace:s000 foo % [[ -d a* ]] && echo hi
pedz@peace:s000 foo % 

Is that what you wanted?