Skip to content

Commit

Permalink
Substitute command when alias is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
sorin-ionescu committed May 19, 2015
1 parent 6a812ed commit cd50676
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/utility/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ if is-callable 'dircolors'; then
eval "$(dircolors --sh)"
fi

alias ls="$aliases[ls] --color=auto"
alias ls="${aliases[ls]:-ls} --color=auto"
else
alias ls="$aliases[ls] -F"
alias ls="${aliases[ls]:-ls} -F"
fi
else
# BSD Core Utilities
Expand All @@ -84,9 +84,9 @@ else
# Define colors for the completion system.
export LS_COLORS='di=34:ln=35:so=32:pi=33:ex=31:bd=36;01:cd=33;01:su=31;40;07:sg=36;40;07:tw=32;40;07:ow=33;40;07:'

alias ls='ls -G'
alias ls="${aliases[ls]:-ls} -G"
else
alias ls='ls -F'
alias ls="${aliases[ls]:-ls} -F"
fi
fi

Expand All @@ -107,7 +107,7 @@ if zstyle -t ':prezto:module:utility:grep' color; then
export GREP_COLOR='37;45' # BSD.
export GREP_COLORS="mt=$GREP_COLOR" # GNU.

alias grep="$aliases[grep] --color=auto"
alias grep="${aliases[grep]:-grep} --color=auto"
fi

# Mac OS X Everywhere
Expand Down

0 comments on commit cd50676

Please sign in to comment.