Skip to content

Commit

Permalink
rbenv update
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaher committed Dec 12, 2014
1 parent a31df8a commit aefa58e
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions dotfiles/dotbash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,41 @@ if readlink /bin/sh | grep bash >/dev/null; then
export ENV
fi

# source "${HOME}/.rbenv/libexec/../completions/rbenv.bash"
# Cribbed from rbenv 0.4.0, 2014-12-12
# source "/usr/local/Cellar/rbenv/0.4.0/libexec/../completions/rbenv.bash"
_rbenv() {
COMPREPLY=()
local word="${COMP_WORDS[COMP_CWORD]}"

if [ "$COMP_CWORD" -eq 1 ]; then
COMPREPLY=( $(compgen -W "$(rbenv commands)" -- "$word") )
else
local command="${COMP_WORDS[1]}"
local completions="$(rbenv completions "$command")"
local words=("${COMP_WORDS[@]}")
unset words[0]
unset words[$COMP_CWORD]
local completions=$(rbenv completions "${words[@]}")
COMPREPLY=( $(compgen -W "$completions" -- "$word") )
fi
}

complete -F _rbenv rbenv

rbenv rehash 2>/dev/null
function rbenv() {
local command="$1"
rbenv() {
typeset command
command="$1"
if [ "$#" -gt 0 ]; then
shift
fi

case "$command" in
shell)
rehash|shell)
eval `rbenv "sh-$command" "$@"`;;
*)
*)
command rbenv "$command" "$@";;
esac
}


export EC2_PRIVATE_KEY="$HOME/.ec2/pk.pem"
export EC2_CERT="$HOME/.ec2/cert.pem"
if [ `uname` == 'Darwin' ]; then
Expand Down

0 comments on commit aefa58e

Please sign in to comment.