1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-06-14 20:41:44 +00:00

Cleaned up the plugins.

This commit is contained in:
Sorin Ionescu
2011-08-30 23:16:15 -04:00
parent 422307c3ca
commit 90e7debc30
66 changed files with 902 additions and 1774 deletions

1
plugins/ruby/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
_rvm

View File

@ -53,13 +53,15 @@ if (( CURRENT == 1 )); then
fi
case "$words[1]" in
list)
if [[ "$state" == forms ]]; then
_gem-installed
_requested installed_gems expl 'installed gems' compadd -a installed_gems
fi ;;
uninstall|update)
(list)
if [[ "$state" == 'forms' ]]; then
_gem-installed
_requested installed_gems expl 'installed gems' compadd -a installed_gems
fi
;;
(uninstall|update)
_gem-installed
_wanted installed_gems expl 'installed gems' compadd -a installed_gems ;;
_wanted installed_gems expl 'installed gems' compadd -a installed_gems
;;
esac

View File

@ -14,3 +14,40 @@ if [[ "$OSTYPE" == darwin* ]]; then
unset cache_file
fi
# Loads RVM into the shell session.
completion_file="${0:h}/_rvm"
if [[ ! -e "$completion_file" ]] && [[ -L "$completion_file" ]]; then
unlink "$completion_file" 2> /dev/null
fi
if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then
# Auto adding variable-stored paths to ~ list conflicts with RVM.
unsetopt auto_name_dirs
# Source RVM.
source "$HOME/.rvm/scripts/rvm"
# Complete RVM.
if [[ ! -e "$completion_file" ]]; then
ln -s \
"$rvm_path/scripts/zsh/Completion/_rvm" \
"$completion_file" \
2> /dev/null
fi
fi
unset completion_file
# Loads rbenv into the shell session.
if [[ -s "$HOME/.rbenv/bin/rbenv" ]]; then
path=("$HOME/.rbenv/bin" $path)
eval "$(rbenv init -)"
fi
# Set environment variables for launchd processes.
if [[ "$OSTYPE" == darwin* ]]; then
for env_var in GEM_PATH GEM_HOME; do
launchctl setenv "$env_var" "${(P)env_var}" &!
done
unset env_var
fi