From: Iain Patterson Date: Tue, 11 Jun 2013 14:20:24 +0000 (+0100) Subject: Prevent hang. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=84d40f6ae9c96dc8cdb70152b139c8a00936efb8;p=profile.git Prevent hang. If ls produced no output the grep could hang. --- diff --git a/.profile.d/ls.bashrc b/.profile.d/ls.bashrc index 88e76e0..c3c6e21 100644 --- a/.profile.d/ls.bashrc +++ b/.profile.d/ls.bashrc @@ -7,7 +7,7 @@ if echo "$ls" | grep gnu.org >/dev/null; then eval `dircolors 2>/dev/null` 2>/dev/null LS_OPTIONS="--color=auto -F -b" - if echo $ls | grep -- --time-style >/dev/null; then + if echo "$ls" | grep -- --time-style >/dev/null; then LS_OPTIONS="$LS_OPTIONS --time-style=long-iso" fi export LS_OPTIONS