From d86c62404d3dde20871dd65366fba86568899048 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Fri, 20 Feb 2015 17:06:16 +0100 Subject: bash-completion: Avoid a pointless fork --- debian/git-buildpackage.bash-completion | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/debian/git-buildpackage.bash-completion b/debian/git-buildpackage.bash-completion index 39701c8..27d5813 100644 --- a/debian/git-buildpackage.bash-completion +++ b/debian/git-buildpackage.bash-completion @@ -99,7 +99,7 @@ _gbp_find_cmd_on_cmdline () done } -_gbp_buildpackage() +_gbp-buildpackage() { local options=$(_gbp_options buildpackage) local branch_opts="--git-debian-branch\= --git-upstream-branch\= --git-upstream-tree\=" @@ -111,7 +111,7 @@ _gbp_buildpackage() "$cbdist_opts" } -_gbp_dch () +_gbp-dch () { local options=$(_gbp_options dch) local branch_opts="--debian-branch\=" @@ -121,7 +121,7 @@ _gbp_dch () _gbp_comp "$options" "$branch_opts" "$tag_opts" "$tristate_opts" } -_gbp_import_orig () +_gbp-import-orig () { local options=$(_gbp_options import-orig) local branch_opts="--debian-branch\= --upstream-branch\=" @@ -131,7 +131,7 @@ _gbp_import_orig () _gbp_comp "$options" "$branch_opts" "$tag_opts" "$tristate_opts" } -_gbp_import_dsc () +_gbp-import-dsc () { local options=$(_gbp_options import-dsc) local branch_opts="--debian-branch\= --upstream-branch\=" @@ -141,7 +141,7 @@ _gbp_import_dsc () _gbp_comp "$options" "$branch_opts" "$tag_opts" "$tristate_opts" } -_gbp_import_dscs () +_gbp-import-dscs () { local options="$(_gbp_options import-dscs) $(_gbp_options import-dsc)" local branch_opts="--debian-branch\= --upstream-branch\=" @@ -151,7 +151,7 @@ _gbp_import_dscs () _gbp_comp "$options" "$branch_opts" "$tag_opts" "$tristate_opts" } -_gbp_pq () +_gbp-pq () { local options=$(_gbp_options pq) options="$options export import rebase drop apply switch" @@ -160,7 +160,7 @@ _gbp_pq () _gbp_comp "$options" "" "" "$tristate_opts" } -_gbp_pull () +_gbp-pull () { local options=$(_gbp_options pull) local branch_opts="--debian-branch\= --upstream-branch\=" @@ -170,7 +170,7 @@ _gbp_pull () _gbp_comp "$options" "$branch_opts" "$tag_opts" "$tristate_opts" } -_gbp_clone () +_gbp-clone () { local options=$(_gbp_options clone) local branch_opts="--debian-branch\= --upstream-branch\=" @@ -180,7 +180,7 @@ _gbp_clone () _gbp_comp "$options" "$branch_opts" "$tag_opts" "$tristate_opts" } -_gbp_create_remote_repo () +_gbp-create-remote-repo () { local options=$(_gbp_options create-remote-repo) local branch_opts="--debian-branch\= --upstream-branch\=" @@ -200,7 +200,7 @@ _gbp () if [ -z $command ]; then COMPREPLY=( $(compgen -W "$commands" -- $cur ) ) else - func=_gbp_$(echo $command | sed -e 's/-/_/g') + func=_gbp-$(echo $command) $func fi } -- cgit v1.2.3