From 0058a21c5f3e44f03e48ee58519d72b9f4dadb0c Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 16 Aug 2016 16:36:11 -0700 Subject: [PATCH] Auto-jump setup --- dotfiles/cider/bootstrap.json | 1 + dotfiles/lib/shellrc.sh | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dotfiles/cider/bootstrap.json b/dotfiles/cider/bootstrap.json index 45d79af8..d196786c 100644 --- a/dotfiles/cider/bootstrap.json +++ b/dotfiles/cider/bootstrap.json @@ -51,6 +51,7 @@ "android-sdk", "ant", "autoconf", + "autojump", "automake", "bash", "binutils", diff --git a/dotfiles/lib/shellrc.sh b/dotfiles/lib/shellrc.sh index 54c4f864..55f87de2 100644 --- a/dotfiles/lib/shellrc.sh +++ b/dotfiles/lib/shellrc.sh @@ -3,8 +3,15 @@ for filename in ~/.lib/shellrc/*; do done [ -s "/usr/local/bin/virtualenvwrapper.sh" ] && . /usr/local/bin/virtualenvwrapper.sh -[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh +function j() { + (( $+commands[brew] )) && { + local pfx=$(brew --prefix autojump) + [[ -f "$pfx/etc/autojump.sh" ]] && . "$pfx/etc/autojump.sh" + j "$@" + } +} environment_variable_exists INSIDE_EMACS && inside_emacs_hook # travis completion -[ -f "$HOME/.travis/travis.sh" ] && source "$HOME/.travis/travis.sh" +# XXX: Disabled to reduce performance impact +# [ -f "$HOME/.travis/travis.sh" ] && source "$HOME/.travis/travis.sh"