You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
679 B

# source $HOME/.nix-profile/share/nix-direnv/direnvrc
source `brew --prefix`/share/chruby/chruby.sh
layout_k8s() {
if [ $commands[kubectl] ]; then
source <(kubectl completion zsh)
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
layout ruby
# For some reason, the PATH order is unstable and sometimes Ruby's
# bin directory is in front of the direnv one, so force the direnv
# bin directory to take precedence
PATH_add ./.direnv/bin
}