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

Re: 'r' history parameter documentation fix



On Monday, 25.07.2011, Bart Schaefer wrote: 

> On Jul 22, 11:37pm, Jesse Weinstein wrote:
> }
> } In the Modifier's section of the docs, defining the 'r' history
> } modifier, "Remove a filename extension of the form `.XXX', leaving the
> } root name." appears to be subtly wrong.
> } 
> } At least in 4.3.10.Debian, (foo=blah.flac; echo ${foo:r}) gives blah, 
> } although it should't, according to the manual, as .flac isn't of the
> } form .XXX .  
> }  
> } I think the doc should be changed to "Remove a filename extension
> } leaving the root name."
>
> That'd be at least as wrong (except maybe less subtly) because it
> doesn't define "extension" at all.
>
> I guess the question is whether anyone is really confused by what the
> doc currently says?

FWIW, I do think leaving out the "of the form `.XXX'" is better (and
avoids possible confusion, although I didn't suffer from it myself). The
manual doesn't explain what a file is or many other taken-for-granted
terms either (and -- to avoid possible confusion ;-) -- I'm not
suggesting it should).

-- 
Štěpán



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