Use $commands instead of which command.

This commit is contained in:
Gökçen Eraslan 2012-12-08 19:24:44 +01:00
commit de36883b97

View file

@ -2,7 +2,7 @@ if [ $commands[fasd] ]; then # check if fasd is installed
eval "$(fasd --init auto)"
alias v='f -e vim'
if [[ $('uname') == 'Linux' ]] && [[ -e $( which xdg-open 2>&1 ) ]]; then
if [[ $('uname') == 'Linux' ]] && [ $commands[xdg-open] ]; then
alias o='a -e xdg-open'
elif [[ $('uname') == 'Darwin' ]]; then
alias o='a -e open'