diff --git a/lib/bashrc.d/bash_completion.nutools b/lib/bashrc.d/bash_completion.nutools index 3f92b61..35ac9a5 100644 --- a/lib/bashrc.d/bash_completion.nutools +++ b/lib/bashrc.d/bash_completion.nutools @@ -23,6 +23,19 @@ if [ -n "$UTOOLS_BASH_COMPLETION" ]; then fi } complete -F _nutools_h -o default ruinst runs rruns + + function __pdev_branches() { + git for-each-ref --format='%(refname:short)' refs/heads | + grep -vF master | + grep -v '^release-' | + grep -v '^hotfix-' + } + function _pdev() { + local cur + _get_comp_words_by_ref cur + COMPREPLY=($(compgen -W "$(__pdev_branches)" "$cur")) + } + complete -F _pdev pdev fi ;; 7*|wheezy*)