Tab completion missing for --includes and branch description in git config
Hi all,
While toying with the tab completion script for bash, I found a couple
of things missing that cannot be completed:
- git config --includes
- git config branch.$BRANCH_NAME.description
Attached are trivial patches based on master to fix those things.
Regards,
--
Michael
From cc463975e4a21dc523fa920db813eada881a0ccd Mon Sep 17 00:00:00 2001
From: Michael Paquier <michael@otacoo.com>
Date: Wed, 7 Jan 2015 09:43:29 +0900
Subject: [PATCH 1/2] Identify --includes for git config in tab completion
Signed-off-by: Michael Paquier <michael@otacoo.com>
---
contrib/completion/git-completion.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 23988ec..d6b0754 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1891,7 +1891,7 @@ _git_config ()
--*)
__gitcomp "
--system --global --local --file=
- --list --replace-all
+ --includes --list --replace-all
--get --get-all --get-regexp
--add --unset --unset-all
--remove-section --rename-section
--
2.2.1
From c2323d093b3a3a9daf0cf7e17dddff6bc028bd0e Mon Sep 17 00:00:00 2001
From: Michael Paquier <michael@otacoo.com>
Date: Wed, 7 Jan 2015 09:48:10 +0900
Subject: [PATCH 2/2] Identify description for git config in tab completion
Signed-off-by: Michael Paquier <michael@otacoo.com>
---
contrib/completion/git-completion.bash | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index d6b0754..412f74b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1900,7 +1900,9 @@ _git_config ()
;;
branch.*.*)
local pfx="${cur%.*}." cur_="${cur##*.}"
- __gitcomp "remote pushremote merge mergeoptions rebase" "$pfx" "$cur_"
+ __gitcomp "
+ description remote pushremote merge mergeoptions rebase
+ " "$pfx" "$cur_"
return
;;
branch.*)
--
2.2.1