:: Re: [DNG] Coreutils 8.25 ls output
Pàgina inicial
Delete this message
Reply to this message
Autor: Rainer Weikusat
Data:  
A: Dng
Assumpte: Re: [DNG] Coreutils 8.25 ls output
Mitt Green <mitt_green@???> writes:
> Adam Borowski wrote:


[...]

>>script names: no.
>>C/Pascal/COBOL sources: no.
>>mp3/videos/ebooks/etc: hell yes.
>
> [...]
> ‎
>>The change is breaking valid use cases.
>
> I definitely understand the indignation,
> yet I can't imagine cases, where mp3/ebooks/
> et al. are used in scripts.


This doesn't affect scripts (except as mentioned elsewhere).

>>The relevant bug is
>>https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813164
>
> For God's sake, look, Yngwie Malmsteen, Ronnie James Dio & Tim ''Ripper'' Owens - Mr. Crowley.mp3 became
> 'Yngwie Malmsteen, Ronnie James Dio & Tim '\'''\''Ripper'\'''\'' Owens - Mr. Crowley.mp3'


'-quoted shell strings don't support any interior quoting. But the shell
concatenates adjacent strings. This means the way to get a ' into a
'-quote string is to split it in three,

'leader'
\'
'trailer'

(multiline syntax used solely as demonstration), ie, a leading, '-quoted
string, a single, quoted ' and a trailing '-quoted string. Considering
that ls already supports a -Q option to print "-quoted strings (which
support inner quoting via \"), using "-quoting for the new output format
had seemed a better idea to me. But that's more-or-less an aesthetic
preference.