Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Re: :r modifier
- X-seq: zsh-workers 13279
- From: Geoff Wing <gcw@xxxxxxx>
- To: Alexandre Duret-Lutz <duret_g@xxxxxxxxxxxxx>
- Subject: Re: PATCH: Re: :r modifier
- Date: Fri, 15 Dec 2000 21:58:55 +1100
- Cc: Zsh Hackers <zsh-workers@xxxxxxxxxxxxxx>
- In-reply-to: <mvbitom56hu.fsf@xxxxxxxxxxxxxxxxxxxx>; from duret_g@xxxxxxxxxxxxx on Fri, Dec 15, 2000 at 11:22:21AM +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- Organization: PrimeNet Computer Consultancy
- References: <mvbzohy6f3g.fsf@xxxxxxxxxxxxxxxxxxxx> <slrn93in94.qqa.mason@xxxxxxxxxxxxxxxxxxxxx> <mvbitom56hu.fsf@xxxxxxxxxxxxxxxxxxxx>
Alexandre Duret-Lutz wrote about Re: PATCH: Re: :r modifier:
:>>> "Geoff" == Geoff Wing <mason@xxxxxxxxxxxxxxx> writes:
:Do you mean you prefer the current behavior or would like another?
I'm used to the current behaviour but don't take my objections too
seriously. I'm now leaning heavily towards your version's behaviour.
I guess I can learn some new skills :-)
% export FOO='foo.bar/baz'
% tcsh -fc 'echo $FOO:r'
foo.bar/baz
% csh -fc 'echo $FOO:r'
foo.bar/baz
% bash -fc 'echo $FOO:r ${FOO:r}'
foo.bar/baz:r foo.bar/baz
% zsh -fc 'echo $FOO:r'
foo
% zsh-alexandre-patch -fc 'echo $FOO:r'
foo.bar/baz
:: item(tt(r))(
::-Remove a trailing suffix of the form `tt(.)var(xxx)', leaving the basename.
::+Remove a filename extension of the form `tt(.)var(xxx)', leaving
::+the root name.
:: )
: Geoff> wasn't that good but what's the "root name"? (Can't
: Geoff> think of anything better at the moment, sorry).
My csh manual says:
"Remove a trailing `.xxx' component, leaving the root name."
so I guess it has precedent.
:But at
:least `root name' offers a mnemonic mean to remember what
:thoses modifiers do (r-root e-extension h-head t-tail).
Yes, I suppose "root name" should be sufficient and I don't really
think we need to explain what it means (nobody else does).
Regards,
--
Geoff Wing : <gcw@xxxxxxxxx>
Rxvt Stuff : <gcw@xxxxxxxx>
Zsh Stuff : <gcw@xxxxxxx>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author