diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-07-31 17:41:50 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-07-31 17:41:50 +1200 |
commit | eb68873a44c96f1f3e6b211a009d35da5560c7ee (patch) | |
tree | 93e4c5b28e2c042f9e5073d818daa766d6c6f9a5 /bash | |
parent | Don't use backticks for command substitution (diff) | |
download | dotfiles-eb68873a44c96f1f3e6b211a009d35da5560c7ee.tar.gz dotfiles-eb68873a44c96f1f3e6b211a009d35da5560c7ee.zip |
Explicitly check for setup command existence
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bashrc | 8 | ||||
-rw-r--r-- | bash/bashrc.d/ls.bash | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/bash/bashrc b/bash/bashrc index f8c9ff73..1ae8960a 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -17,10 +17,14 @@ HISTTIMEFORMAT='%F %T ' unset MAILCHECK # Never beep at me -setterm -bfreq 0 >/dev/null +if command -v setterm >/dev/null; then + setterm -bfreq 0 +fi # Turn off annoying and useless flow control keys -stty -ixon >/dev/null +if command -v stty >/dev/null; then + stty -ixon +fi # Use completion, if available if [[ -r /etc/bash_completion ]]; then diff --git a/bash/bashrc.d/ls.bash b/bash/bashrc.d/ls.bash index aa0d5777..6ce1d750 100644 --- a/bash/bashrc.d/ls.bash +++ b/bash/bashrc.d/ls.bash @@ -15,5 +15,7 @@ alias ls="ls $(__lsopts)" unset __lsopts # Apply color and exclusions to ls and grep -eval "$(dircolors --sh)" +if command -v dircolors >/dev/null; then + eval "$(dircolors --sh)" +fi |