aliases/general: use `_command_exists`
parent
699d893bef
commit
6618457f9e
|
|
@ -30,7 +30,7 @@ then
|
||||||
alias grep='grep --color=auto'
|
alias grep='grep --color=auto'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if which gshuf &> /dev/null
|
if _command_exists gshuf
|
||||||
then
|
then
|
||||||
alias shuf=gshuf
|
alias shuf=gshuf
|
||||||
fi
|
fi
|
||||||
|
|
@ -65,7 +65,7 @@ alias -- -='cd -' # Go back
|
||||||
alias h='history'
|
alias h='history'
|
||||||
|
|
||||||
# Tree
|
# Tree
|
||||||
if [ ! -x "$(which tree 2>/dev/null)" ]
|
if ! _command_exists tree
|
||||||
then
|
then
|
||||||
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
|
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue