diff --git a/lib/completion.d/ptools b/lib/completion.d/ptools index 085c636..85bf02d 100644 --- a/lib/completion.d/ptools +++ b/lib/completion.d/ptools @@ -3,8 +3,8 @@ function __pdev_branches() { local prefix=origin/ { - git for-each-ref refs/heads/ --format='%(refname:short)' - git for-each-ref "refs/remotes/$prefix" --format='%(refname:short)' | grep -F "$prefix" | cut -c $((${#prefix} + 1))- + git for-each-ref refs/heads/ --format='%(refname:short)' 2>/dev/null + git for-each-ref "refs/remotes/$prefix" --format='%(refname:short)' 2>/dev/null | grep -F "$prefix" | cut -c $((${#prefix} + 1))- } | LANG=C sort -u | grep -vF HEAD | grep -vF master | @@ -12,6 +12,6 @@ function __pdev_branches() { grep -v '^hotfix-' } function __prel_branches() { - git for-each-ref --format='%(refname:short)' refs/heads | + git for-each-ref --format='%(refname:short)' refs/heads 2>/dev/null | grep -E '^(master$|release-)' }