diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-06-24 23:52:44 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-06-24 23:52:44 +1200 |
commit | 60898acf2c29565ea086bf84034fc399df72e567 (patch) | |
tree | 9dd97a5fd3bed47aa04ae9c2bfa325a1d6572db0 /bash/bashrc.d/ls.bash | |
parent | Fix broken return value prompt element (diff) | |
download | dotfiles-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.bash | 3 |
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 } |