Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: trailing components
- X-seq: zsh-workers 44423
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: trailing components
- Date: Tue, 18 Jun 2019 14:54:47 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190618135451euoutp011d827d82fe589036a266727fe6c797ee~pT3Cinz_J3193931939euoutp01e
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1560866091; bh=5lDYB7Ev3bvX2E6SogEjTr3SIZbcmFz7WfSvIW5Sazs=; h=Subject:From:To:Date:In-Reply-To:References:From; b=p3U5Zzl/J5Zsm/kIBC6d5Cvp+ozRoF5H58AjinyvqGKrpyZizCOC3rgaVuuJhbZzc 62erXbmaGQ8eBgDX1iFJzHsmvSMkk6ScwNT2XDQRZ7hiLVt7i/gwTLQn3n4cOTp6dr 8TBPYDm2USe8ge0YHzFddBOYH+ZP2mgKs2qxwdpU=
- In-reply-to: <523ba6f0-651a-444a-8ceb-c7c4ec186b20@www.fastmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CGME20190618130008eucas1p176cc19c1c8b831fc30b4bf7b3294f3af@eucas1p1.samsung.com> <1560862806.7731.11.camel@samsung.com> <523ba6f0-651a-444a-8ceb-c7c4ec186b20@www.fastmail.com>
On Tue, 2019-06-18 at 13:37 +0000, Daniel Shahaf wrote:
> Peter Stephenson wrote on Tue, 18 Jun 2019 13:01 +00:00:
> >
> > I needed to preserve a number of trailing components of a path (other
> > than one) and couldn't think of an easy way of doing it. Rather than
> > craft obscure pattern substitutions, or use an ad-hoc expression to
> > strip the prefix, I came up with a patch to add an optional number after
> > the "t" in history style modifiers to do this. I put it after rather
> > than before because history-style colon expressions are quite sensitive
> > to what the first character is after the colon.
> >
> > Before I come up with tests and fix up the ensuing failures, you can let
> > me know if there's a better way of doing this to save me the trouble.
> Here are some alternatives, but I'm not claiming any of them is better than «${foo:t2}»:
Thanks, it's useful to know other people's thinking for comparison ---
to be clear, what I was hoping for and lacking was something along the
lines of:
echo /blah/blah/blah/**/*.oogabooga(<stuff-here>)
even if <stuff-here> wasn't quite as short as :t2. I could live with a
few more characters but a loop or complicated substitution would lead me
to propose adding the new code instead.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author