From 504ec1b8c9f24a827f2239fada266ec0c415fe54 Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Sun, 10 May 2015 14:23:57 -0700 Subject: [PATCH] substitute command name when alias is not defined for ls and grep in the utility module. --- modules/utility/init.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index 30fee32a..624049d7 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -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 @@ -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