From 84d40f6ae9c96dc8cdb70152b139c8a00936efb8 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Tue, 11 Jun 2013 15:20:24 +0100 Subject: [PATCH] Prevent hang. If ls produced no output the grep could hang. --- .profile.d/ls.bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.7.4