[direnv] fix for chruby path shenanigans

pull/41/head
Alpha Chen 2 years ago
parent 0d4225ad18
commit 534c80f9ce

@ -1,10 +1,21 @@
bundle() { source $HOME/.nix-profile/share/nix-direnv/direnvrc
PATH_add .bundle/bin source `brew --prefix`/share/chruby/chruby.sh
export GEM_HOME="`pwd`/.bundle"
}
layout_k8s() { layout_k8s() {
if [ $commands[kubectl] ]; then if [ $commands[kubectl] ]; then
source <(kubectl completion zsh) source <(kubectl completion zsh)
fi fi
} }
# https://github.com/direnv/direnv/issues/98#issuecomment-33677881
use_ruby() {
local ver=$1
if [[ -z $ver ]] && [[ -f .ruby-version ]]; then
ver=$(cat .ruby-version)
fi
if [[ -z $ver ]]; then
echo Unknown ruby version
exit 1
fi
chruby $ver
}

Loading…
Cancel
Save