On 2018-10-22 04:43:24 -0700, Pádraig Brady wrote:
> The reason \= is quoted with -bF is to distinguish socket
> names that end in =. An edge case indeed, though the issue
> is not particular to '=', but all of the classifier chars.

That's undocumented, and IMHO, unnecessary in practice (such
appended characters can only occur at the end, and even in this
case, colors remove any ambiguity for me).

It wouldn't be much an issue if a classifier char would be quoted
only when it is at the end, because:
  * such a char at the end of a filename is very rare;
  * completion can handle it easily (while when it occurs earlier,
    it can be in a common prefix, e.g. for filenames obtained with
    "wget -r").

> -b does not support copy and paste at the shell directly.
> For that, the default (--quoting-style=shell-escape) is
> really the only one directly usable.

Well, I've used -b by default for more than 20 years, mainly due to
non-graphic characters (the goal was not to do copy-paste of such
filenames, but for security reasons). I see that --quoting-style
is rather new, but its documentation is still very inaccurate, and
--quoting-style=shell-escape is more ugly than -b. For instance,
with -b, one gets

  a\ab

(not copy-pastable, but it won't be generated by common programs,
so that's not an issue), while --quoting-style=shell-escape gives

  'a'$'\a''b'

which is rather unreadable.

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to