Re: [ -d (#i)Temp ]
Roman Perepelitsa <[email protected]> Fri, 10 Apr 2026 20:15:07 +0200
| Newsgroups | gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <CAN=4vMrQ=pORSJTw5qrv6k5pTJzRXQa+vh_k46yT+FzmgktdkA@mail.gmail.com> |
On Fri, Apr 10, 2026 at 7:28 PM Ray Andrews <[email protected]> wrote: > > Is it possible to do something like this:? > > [ -d (#i)Temp ] && echo 'it's a directory' [[ -d ''(#i)Temp(#qN) ]] && echo "it's a directory" > I'd expect it to fail if there's more than one match The snippet I posted above will succeed if there is one or more matches. I don't know of a simple one-liner that will succeed only when there is exactly one match. Roman