]> Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/blob - .bash_completion.d/fabric.bash
.vimrc: Shortcut key for redraw screen
[dotfiles.git] / .bash_completion.d / fabric.bash
1 #
2 # Bash completion for fabric
3 # (https://gist.github.com/exhuma/2136677)
4 #
5 function _fab_complete() {
6 local cur
7 if [[ -f "fabfile.py" || -d "fabfile" ]]; then
8 cur="${COMP_WORDS[COMP_CWORD]}"
9 COMPREPLY=( $(compgen -W "$(fab -F short -l)" -- ${cur}) )
10 return 0
11 else
12 # no fabfile.py found. Don't do anything.
13 return 1
14 fi
15 }
16
17 complete -o nospace -F _fab_complete fab