diff --git a/aliases.sh b/aliases.sh index b3621f7..30b9c52 100755 --- a/aliases.sh +++ b/aliases.sh @@ -72,7 +72,7 @@ alias ssh1="ssh -o ControlMaster=no" # Some colorizing options for grc -if [[ "$TERM" != dumb ]] && (( $+commands[grc] )) ; then +if [[ "$TERM" != dumb ]] && [[ -f $(which grc) ]] ; then # Prevent grc aliases from overriding zsh completions. setopt COMPLETE_ALIASES @@ -89,7 +89,6 @@ if [[ "$TERM" != dumb ]] && (( $+commands[grc] )) ; then ifconfig \ last \ ldap \ - ls \ make \ mount \ mtr \ @@ -104,7 +103,7 @@ if [[ "$TERM" != dumb ]] && (( $+commands[grc] )) ; then # Set alias for available commands. for cmd in $cmds ; do - if (( $+commands[$cmd] )) ; then + if [[ -f $(which $cmd) ]] ; then alias $cmd="grc --colour=auto $cmd" fi done