aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/ls.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-06-24 23:52:44 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-06-24 23:52:44 +1200
commit60898acf2c29565ea086bf84034fc399df72e567 (patch)
tree9dd97a5fd3bed47aa04ae9c2bfa325a1d6572db0 /bash/bashrc.d/ls.bash
parentFix broken return value prompt element (diff)
downloaddotfiles-60898acf2c29565ea086bf84034fc399df72e567.tar.gz
dotfiles-60898acf2c29565ea086bf84034fc399df72e567.zip
Just check ls/grep option calls once
Diffstat (limited to 'bash/bashrc.d/ls.bash')
-rw-r--r--bash/bashrc.d/ls.bash3
1 files changed, 2 insertions, 1 deletions
diff --git a/bash/bashrc.d/ls.bash b/bash/bashrc.d/ls.bash
index 6c793a52..3883c99a 100644
--- a/bash/bashrc.d/ls.bash
+++ b/bash/bashrc.d/ls.bash
@@ -4,7 +4,8 @@ eval "$(dircolors -b &>/dev/null)"
# Function returns calculated options for ls
function __lsopts {
local lsopts=
- ls --help | grep -- --color &>/dev/null \
+ local lshelp=$(ls --help )
+ echo $lshelp | grep -- --color &>/dev/null \
&& lsopts="${lsopts} --color=auto"
echo $lsopts
}