From 841e06ec392ffc3f503717ea33864cfa33c030eb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 12 Dec 2015 07:49:42 -0500 Subject: [PATCH] alias b='bd' + alias bb='cd (git root)' --- zsh/aliases.zsh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 987150f2..4d00e982 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -38,10 +38,16 @@ done # Send to sprunge.us alias bin="curl -s -F 'sprunge=<-' http://sprunge.us | head -n 1 | tr -d '\r\n ' | pbcopy" -j() { - local fasd_ret="$(fasd -i -d "$@")" - [[ -d "$fasd_ret" ]] && cd "$fasd_ret" || print "$fasd_ret" -} +if is-callable 'bd'; then + alias b="bd" + alias bb='cd "$(git root)"' +fi +if is-callable 'fasd'; then + j() { + local fasd_ret="$(fasd -i -d "$@")" + [[ -d "$fasd_ret" ]] && cd "$fasd_ret" || print "$fasd_ret" + } +fi # transmission-remote if is-callable 'transmission-remote'; then @@ -83,9 +89,9 @@ alias py='python' alias pye='pyenv' alias rb='ruby' alias rbe='rbenv' -alias b='bundle' -alias be='bundle exec' -alias bi='bundle install -path vendor' +alias bu='bundle' +alias bue='bundle exec' +alias bui='bundle install -path vendor' alias ans='ansible' alias ansp='ansible-playbook' alias fabg='noglob fab -f ~/.dotfiles/ansible/fabfile.py'