changeset 3475 | 03932425cfd8 |
parent 2695 | c995d68333cf |
child 3476 | 13a9a2136dd7 |
--- a/contrib/bash_completion +++ b/contrib/bash_completion @@ -251,8 +251,13 @@ complete -o bashdefault -o default -F _h # mq _hg_ext_mq_patchlist() { - local patches=$("$hg" $1 2>/dev/null) - COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$patches' -- "$cur")) + local patches + patches=$("$hg" $1 2>/dev/null) + if [ $? -eq 0 ] && [ "$patches" ]; then + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$patches' -- "$cur")) + return 0 + fi + return 1 } _hg_ext_mq_queues()