diff options
-rw-r--r-- | debian/gbp.completion | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/debian/gbp.completion b/debian/gbp.completion index 0b103993..1f7f484b 100644 --- a/debian/gbp.completion +++ b/debian/gbp.completion @@ -53,6 +53,9 @@ _gbp_comp () local tristate_opts=${4:-"--color\="} local cbdist_opts=${5:-"--git-dist\="} local remote_config_opts="--remote-config\=" + local file_opts="--postimport\= --git-builder\= --git-cleaner\= \ + --git-export-dir\= --git-postbuild\= --git-postexport\= \ + --git-posttag\= --git-prebuild\= --git-tarball-dir\=" local start_opt="" # COMPREPLY considers '=' as a word. For $prev we prefer the word before the actual "=" @@ -93,6 +96,11 @@ _gbp_comp () return 0 fi + if [[ "${file_opts}" == *$prev* ]]; then + COMPREPLY=( $(compgen -f -- $cur ) ) + return 0 + fi + # 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') |