bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33113: incorrect and inconsistent quoting in ls output


From: Paul Eggert
Subject: bug#33113: incorrect and inconsistent quoting in ls output
Date: Mon, 22 Oct 2018 01:21:40 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

Vincent Lefevre wrote:
I get the following with ls (GNU coreutils) 8.30.

zira% touch a=b a=b\&c
zira% ls a=b*
'a=b'  'a=b&c'
zira% ls -b a=b*
a=b  a=b&c
zira% ls -F a=b*
'a=b'  'a=b&c'
zira% ls -bF a=b*
a\=b  a\=b&c

AFAIK, the = character is not a shell metacharacter (except with zsh
but only in the first position), thus does not need to be quoted.

'=' is a shell metacharacter after 'set -k' in Bash.

Moreover, while & is not a metacharacter, it is a special character
that should be quoted for practical reasons.

As far as I can see '&' is being quoted correctly in the above examples. -b means to quote for C strings, not for the shell. If you want to quote for the shell, try --quoting-style='shell-escape'.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]