coreutils
[Top][All Lists]
Advanced

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

dircolors man page should mention proper quoting


From: Eric Blake
Subject: dircolors man page should mention proper quoting
Date: Wed, 15 Jun 2016 16:13:58 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

'info dircolors' properly mentions that you should use:

eval "$(dircolors ...)"

but there is no mention in 'dircolors --help' or 'man dircolors' about
the proper way to use it with eval.

I mention this because the 'ssh-agent' man page has a bug: it suggests:

eval `ssh-agent -s`

which BREAKS if any of the environment variables thus output contain
whitespace.  It should be:

eval "`ssh-agent -s`"

(or modern $(), rather than ``).

Since not everyone bothers to read 'info dircolors', and there are lots
of sites out there with bad advice that lack quoting, we probably ought
to make the --help/man page more explicit on safe usage patterns.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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