Skip to content

Instantly share code, notes, and snippets.

@ecylmz
Created August 2, 2012 14:40
Show Gist options
  • Save ecylmz/3237547 to your computer and use it in GitHub Desktop.
Save ecylmz/3237547 to your computer and use it in GitHub Desktop.
autocomplete for teamocil gem
{ [ -d ~/.teamocil ] &&
_teamocil()
{
local cur
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
local files=$(for f in ~/.teamocil/*; do f=$(basename $f); echo ${f%.*}; done)
COMPREPLY=($(compgen -W "${files}" $cur))
}
} &&
complete -F _teamocil teamocil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment