From 5ce16ad385e94ca331735b938d6f851db42fc1cf Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Thu, 20 Oct 2016 17:25:18 +1100 Subject: [PATCH] Minor cleanup of alias definitions --- config/zsh/interactive/aliases | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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