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

Re: 'r' history parameter documentation fix



On Mon, 25 Jul 2011, Peter Stephenson wrote:

On Mon, 25 Jul 2011 14:27:24 +0200 Štěpán Němec wrote:
Remove a filename extension leaving the root name. Strings with no filename extension are not altered. For this purpose, a filename extension is a `tt(.)' followed by any number characters (including
                                               ^
                                               of

[Just making this addition more obvious. I didn't notice it in my mailer, and pws didn't respond to it inline.]


zero) that are neither `tt(.)' nor `tt(/)' and that continue to the end of the string. For example, the extension of `tt(foo.orig.c)' is `tt(.c)', and `tt(dir.c/foo)' has no extension.

Quite clear to me. (Except that I'd still prefer just leaving the explanation out than opening this can of worms -- for instance, although it might seem far-fetched, the "for this purpose" thing made me wonder "Hm, is this supposed to imply that Zsh also might have other notions of file extensions in other contexts?"

I'll remove "for this purpose".

Seems important. Or maybe it could be changed to 'Remove a tt(.) followed by a filename extension'?

:e is described in the same section as "Remove all but the extension", which by the definition above would include the dot.

--
Best,
Ben


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