Skip to content

Instantly share code, notes, and snippets.

@evansd
Created October 15, 2010 17:24
Show Gist options
  • Select an option

  • Save evansd/628574 to your computer and use it in GitHub Desktop.

Select an option

Save evansd/628574 to your computer and use it in GitHub Desktop.
Tab-completion script for Fabric (Debian/Ubuntu style)
have fab && {
_fab_completion()
{
COMPREPLY=()
local cur tasks
tasks=$(fab --shortlist 2>/dev/null)
_get_comp_words_by_ref cur
COMPREPLY=( $(compgen -W "${tasks}" -- ${cur}) )
}
complete -F _fab_completion fab
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment