On Sat, 18 Apr 2020 at 15:45, Roman Perepelitsa wrote: > On Sat, Apr 18, 2020 at 3:43 PM Sebastian Gniazdowski > wrote: > > I need the technique to be pattern-based – it is used in script in a > $~pattern way. > > The first example you posted was helpful because it was clear from it > what you want to achieve. > > Can you post another example like that, one that cannot be fixed by > replacing (|) with {,}? > pick="(/tmp/gh|./gh)" list=( ${(M)~pick##/*}(DN) ) -- Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit Blog: http://zdharma.org