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

Re: PATCH: Re: :r modifier

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'
% csh -fc 'echo $FOO:r'
% bash -fc 'echo $FOO:r ${FOO:r}'
foo.bar/baz:r foo.bar/baz
% zsh -fc 'echo $FOO:r'
% zsh-alexandre-patch -fc 'echo $FOO:r'

:: 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).

Geoff Wing : <gcw@xxxxxxxxx>
Rxvt Stuff : <gcw@xxxxxxxx>
Zsh Stuff  : <gcw@xxxxxxx>

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