~ubuntu-branches/ubuntu/wily/rbenv/wily

« back to all changes in this revision

Viewing changes to completions/rbenv.bash

  • Committer: Package Import Robot
  • Author(s): Antonio Terceiro
  • Date: 2011-09-24 12:27:44 UTC
  • Revision ID: package-import@ubuntu.com-20110924122744-gpszt0huloxxzu6f
Tags: upstream-0.1.2+git20100922
ImportĀ upstreamĀ versionĀ 0.1.2+git20100922

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
_rbenv() {
 
2
  COMPREPLY=()
 
3
  local word="${COMP_WORDS[COMP_CWORD]}"
 
4
 
 
5
  if [ "$COMP_CWORD" -eq 1 ]; then
 
6
    COMPREPLY=( $(compgen -W "$(rbenv commands)" -- "$word") )
 
7
  else
 
8
    local command="${COMP_WORDS[1]}"
 
9
    local completions="$(rbenv completions "$command")"
 
10
    COMPREPLY=( $(compgen -W "$completions" -- "$word") )
 
11
  fi
 
12
}
 
13
 
 
14
complete -F _rbenv rbenv