From 69548d0d7682e000f97bcd6d0c0321210f8a2c8b Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Fri, 6 Mar 2015 07:25:25 +0400 Subject: [PATCH] =?UTF-8?q?compl=C3=A9tion=20pour=20pdev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/bashrc.d/bash_completion.nutools | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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*)