diff --git a/fish/fish/functions/rbenv.fish b/fish/fish/functions/rbenv.fish new file mode 100644 index 0000000..d7fd69b --- /dev/null +++ b/fish/fish/functions/rbenv.fish @@ -0,0 +1,11 @@ +function rbenv + set -l command $argv[1] + [ (count $argv) -gt 1 ]; and set -l args $argv[2..-1] + + switch $command + case shell + rbenv_shell $args + case '*' + command rbenv $command $args + end +end diff --git a/fish/fish/functions/rbenv_shell.fish b/fish/fish/functions/rbenv_shell.fish new file mode 100644 index 0000000..0fa0c8c --- /dev/null +++ b/fish/fish/functions/rbenv_shell.fish @@ -0,0 +1,25 @@ +function rbenv_shell + set -l vers $argv[1] + + switch "$vers" + case '--complete' + echo '--unset' + echo 'system' + exec rbenv-versions --bare + return + case '--unset' + set -e RBENV_VERSION + return 1 + case '' + if [ -z "$RBENV_VERSION" ] + echo "rbenv: no shell-specific version configured" >&2 + return 1 + else + echo "$RBENV_VERSION" + return + end + case '*' + rbenv prefix "$vers" > /dev/null + set -g -x RBENV_VERSION "$vers" + end +end diff --git a/fish/fish/includes/path.fish b/fish/fish/includes/path.fish index b323d85..fef7a3c 100644 --- a/fish/fish/includes/path.fish +++ b/fish/fish/includes/path.fish @@ -1,10 +1,9 @@ +set -x PATH /usr/local/bin $PATH set -x PATH /usr/local/sbin $PATH +set -x PATH /usr/local/share/npm/bin $PATH +set -x PATH /usr/local/share/python $PATH set -x PATH $HOME/.dotfiles/bin $PATH +set -x PATH $HOME/.rbenv/plugins/ruby-build/bin $PATH +set -x PATH $HOME/.rbenv/bin $PATH set -x PATH $HOME/.rbenv/shims $PATH -set -x PATH /usr/local/share/npm/bin $PATH -set -x PATH /usr/local/share/python $PATH -set -x PATH ~/.dotfiles/bin $PATH -set -x PATH /usr/local/share/npm/bin $PATH -set -x PATH /usr/local/share/python $PATH -set -x PATH ~/.misc/git-achievements $PATH -set -x PATH /Applications/Sublime\ Text\ 3.app/Contents/SharedSupport/bin $PATH +set -x PATH $HOME/.misc/git-achievements $PATH