diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/git-buildpackage.bash-completion | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/debian/git-buildpackage.bash-completion b/debian/git-buildpackage.bash-completion index 57b26758..8c61170d 100644 --- a/debian/git-buildpackage.bash-completion +++ b/debian/git-buildpackage.bash-completion @@ -60,7 +60,12 @@ _gbp_comp () return 0 fi - COMPREPLY=($(compgen -W "$options" -- $cur)) + # separate opts by tab so we can append a space to all options not ending + # with an equal sign + tab_opts=$(echo "$options" | sed -e 's/ \+/\t/g' -e 's/[^=]$/& /g') + type compopt &>/dev/null && compopt -o nospace + local IFS=$'\t\n' + COMPREPLY=($(compgen -W "$tab_opts" -- $cur)) } |