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

Re: Glob specifiers for intermediate path components



On Nov 27,  5:27am, Jorg Ziefle wrote:
} Subject: Re: Glob specifiers for intermediate path components
}
} On Thu, Nov 27, 2014 at 2:52 AM, Bart Schaefer
} > split a(...)/b(...)/c(...)/d(...)/e(...)/f(...) on the slashes without
} > being confused by the (/) glob qualifier
} 
} $ perl -e '$_="a(.)/b(@)/c(/N)/d(*)/e(@)/f/g/h/i(/)"; while
} (m{((.*?)(\(.*?\))?)(/|$)}g) { print "$1\n" }'

It probably doesn't have to be that grotty ... just split on ")/" and
then patch up the lost close parens, for example.  Yes, you can come
up with a convoluted qualifier that has ")/" embedded in it, so it
wouldn't be perfect, but it'd cover 99+% of interactive use.



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