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

Re: 'r' history parameter documentation fix



On Mon, 25 Jul 2011 14:27:24 +0200
Štěpán Němec <stepnem@xxxxxxxxx> 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
> > 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".

> Everybody knows what a file extension is, right?)

I think it's worth being explicit.  For example, it's probably obvious
to a geek that alongfilename.withalongbitontheend has a file extension,
but a casual shell user might say "surely that's too long to be an
extension?  aren't they limited to three characters, or something?",
or they might not realise "manpage.3" had an extension ("surely they've
got to be alphabetic, or something"?) and it's not necessarily clear
whether "foo." has an extension "." or no extension.  Etcetera.

-- 
Peter Stephenson <pws@xxxxxxx>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog



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