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

Re: How to overcome the (a/b/c…)(N) pattern limitation?



On Sat, 18 Apr 2020 at 14:56, Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
wrote:

> On Sat, Apr 18, 2020 at 2:51 PM Sebastian Gniazdowski
> <sgniazdowski@xxxxxxxxx> wrote:
> > I was trying to do: ls (/tmp/somedir/gh|./gh)(N)
>
> This should work:
>
>   ls {/tmp/somedir/gh,./gh}(N)
>
> Note that you'll get listing for the current directory if there are no
> matches.
>
> Roman.
>

I need the technique to be pattern-based – it is used in script in a
$~pattern way.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit
Blog: http://zdharma.org


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