Re: [ -d (#i)Temp ]
Roman Perepelitsa <[email protected]> Fri, 10 Apr 2026 20:19:43 +0200
| Newsgroups | gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <CAN=4vMp9QAur+FbPboTsr97mGUYjJVKFfL6u3=cuC9r0L8dp7w@mail.gmail.com> |
On Fri, Apr 10, 2026 at 8:15 PM Roman Perepelitsa <[email protected]> wrote: > > 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" This one has a bug that triggers when there is more than one match for (#i)Temp and not all matches are directories. The following does not have this issue: [[ -n ''(#i)Temp(#qN/) ]] && echo "there is at least one (#i)Temp dir" Roman