bash-completion: Avoid a pointless fork
authorGuido Günther <agx@sigxcpu.org>
Fri, 20 Feb 2015 16:06:16 +0000 (17:06 +0100)
committerGuido Günther <agx@sigxcpu.org>
Fri, 20 Feb 2015 16:06:16 +0000 (17:06 +0100)
debian/git-buildpackage.bash-completion

index 39701c873dda84461f980af1c66ae79bcc2fe356..27d5813ea0a7cd6bab9806da342d1f95f092552a 100644 (file)
@@ -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
 }