Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Glob specifiers for intermediate path components
- X-seq: zsh-users 19457
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Glob specifiers for intermediate path components
- Date: Wed, 26 Nov 2014 21:46:51 -0800
- In-reply-to: <CAO8h=ng7sLp1HND_WonVJqspYqMYyS+FTpHbobmP7JmaVnj41w@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAO8h=njW+7we5z+_E8pCYKdCG3UGUqWEJAZpsaQTts25ENpOyw@mail.gmail.com> <CAHYJk3TOZpJKUDxczqkr2RYJbOkjjN4mqG=kcf9o=3j=843QEA@mail.gmail.com> <141126175240.ZM11126@torch.brasslantern.com> <CAO8h=ng7sLp1HND_WonVJqspYqMYyS+FTpHbobmP7JmaVnj41w@mail.gmail.com>
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