app-shells/bash: bashrc: quote the output of dircolors #572582#8
authorMike Frysinger <vapier@gentoo.org>
Tue, 2 Feb 2016 21:32:36 +0000 (16:32 -0500)
committerMike Frysinger <vapier@gentoo.org>
Wed, 3 Feb 2016 18:51:41 +0000 (13:51 -0500)
The output of dircolors generally shouldn't be problematic even when it's
unquoted (as it tends to be a long dense string w/out whitespace), but add
quotes anyways just to be safe.

Reported-by: konsolebox@gmail.com
app-shells/bash/files/bashrc

index ed46b7d7e38ce4ff2176fdf2b5a57887cf4c0dff..c5b449bf837a2300f42109c78b60649cd6751d5b 100644 (file)
@@ -68,9 +68,9 @@ if ${use_color} ; then
        # Enable colors for ls, etc.  Prefer ~/.dir_colors #64489
        if type -P dircolors >/dev/null ; then
                if [[ -f ~/.dir_colors ]] ; then
-                       eval $(dircolors -b ~/.dir_colors)
+                       eval "$(dircolors -b ~/.dir_colors)"
                elif [[ -f /etc/DIR_COLORS ]] ; then
-                       eval $(dircolors -b /etc/DIR_COLORS)
+                       eval "$(dircolors -b /etc/DIR_COLORS)"
                fi
        fi
 else