git://git.iain.cx/iain
/
profile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2447310
)
Prevent hang.
author
Iain Patterson
<me@iain.cx>
Tue, 11 Jun 2013 14:20:24 +0000
(15:20 +0100)
committer
Iain Patterson
<me@iain.cx>
Thu, 13 Jun 2013 09:30:50 +0000
(10:30 +0100)
If ls produced no output the grep could hang.
.profile.d/ls.bashrc
patch
|
blob
|
history
diff --git
a/.profile.d/ls.bashrc
b/.profile.d/ls.bashrc
index
88e76e0
..
c3c6e21
100644
(file)
--- 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