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

« back to all changes in this revision

Viewing changes to completions/rbenv.zsh

  • 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
compctl -K _rbenv rbenv
 
2
 
 
3
_rbenv() {
 
4
  local word words completions
 
5
  read -cA words
 
6
  word="${words[2]}"
 
7
 
 
8
  if [ "${#words}" -eq 2 ]; then
 
9
    completions="$(rbenv commands)"
 
10
  else
 
11
    completions="$(rbenv completions "${word}")"
 
12
  fi
 
13
 
 
14
  reply=("${(ps:\n:)completions}")
 
15
}