diff --git a/config/zsh/interactive/aliases b/config/zsh/interactive/aliases index a1e1028..16498f3 100644 --- a/config/zsh/interactive/aliases +++ b/config/zsh/interactive/aliases @@ -1,17 +1,17 @@ #! zsh -alias has_command='whence >/dev/null' -alias ls="ls -F --color=auto" -alias lsl="ls -lh" -alias grep="grep --color=auto" -alias egrep="egrep --color=auto" -alias pseudo="sudo" -if has_command xdg-open; then - alias ]='xdg-open' +alias ls='ls -F --color=auto' +alias lsl='ls -lh' +alias grep='grep --color=auto' +alias egrep='egrep --color=auto' +alias pseudo=sudo +if (( $+commands[xdg-open] )); then + alias ]=xdg-open else - alias ]='open' + alias ]=open fi +alias cdu=cd-gitroot # make sure ELinks can detect when it's in tmux alias elinks="STY= elinks" -has_command hub && alias git=hub +(( $+commands[hub] )) && alias git=hub