All of lore.kernel.org
 help / color / mirror / Atom feed
* Missing completions for the 'config' subcommand
@ 2022-06-28  5:49 Manuel Boni
  2022-06-28  7:39 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 2+ messages in thread
From: Manuel Boni @ 2022-06-28  5:49 UTC (permalink / raw)
  To: git

What did you do before the bug happened? (Steps to reproduce your issue)
1) Start Git Bash, and optionally use 'set -x';
2) type 'git config incl';
3) attempt to tab-complete the last word.

What did you expect to happen? (Expected behavior)
The list of available completions should include the 'include' and
'includeIf' expressions.

What happened instead? (Actual behavior)
The expressions mentioned previously are not present.

What's different between what you expected and what actually happened?
The list of completions for the 'config' subcommand does not contain
all the available sections.

[System Info]
git version:
git version 2.36.1.windows.1
cpu: x86_64
built from commit: e2ff68a2d1426758c78d023f863bfa1e03cbc768
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Windows 10.0 19044
compiler info: gnuc: 11.3
libc info: no libc information available
$SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe


[Enabled Hooks]
not run from a git repository - no hooks to show

Thank you for your attention.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Missing completions for the 'config' subcommand
  2022-06-28  5:49 Missing completions for the 'config' subcommand Manuel Boni
@ 2022-06-28  7:39 ` Ævar Arnfjörð Bjarmason
  0 siblings, 0 replies; 2+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2022-06-28  7:39 UTC (permalink / raw)
  To: Manuel Boni; +Cc: git


On Tue, Jun 28 2022, Manuel Boni wrote:

> What did you do before the bug happened? (Steps to reproduce your issue)
> 1) Start Git Bash, and optionally use 'set -x';
> 2) type 'git config incl';
> 3) attempt to tab-complete the last word.
>
> What did you expect to happen? (Expected behavior)
> The list of available completions should include the 'include' and
> 'includeIf' expressions.
>
> What happened instead? (Actual behavior)
> The expressions mentioned previously are not present.
>
> What's different between what you expected and what actually happened?
> The list of completions for the 'config' subcommand does not contain
> all the available sections.
>
> [System Info]
> git version:
> git version 2.36.1.windows.1
> cpu: x86_64
> built from commit: e2ff68a2d1426758c78d023f863bfa1e03cbc768
> sizeof-long: 4
> sizeof-size_t: 8
> shell-path: /bin/sh
> feature: fsmonitor--daemon
> uname: Windows 10.0 19044
> compiler info: gnuc: 11.3
> libc info: no libc information available
> $SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe
>
>
> [Enabled Hooks]
> not run from a git repository - no hooks to show

Something like this patch would fix this, since we just generate this
completion list by scraping Documentation/config/*.txt. See
generate-configlist.sh at the top-level:
	
	diff --git a/Documentation/config/includeif.txt b/Documentation/config/includeif.txt
	new file mode 100644
	index 00000000000..7f7513e9197
	--- /dev/null
	+++ b/Documentation/config/includeif.txt
	@@ -0,0 +1,5 @@
	+include.path::
	+includeIf.<condition>.path::
	+	Special variables to include other configuration files. See
	+	the "CONFIGURATION FILE" section in the main
	+	linkgit:git-config[1] documentation.

If you're willing to make this your first patch to git.git that would be
great:) I think this with something to give it basic test coverage would
be nice, you could use these tests as a template:
	
	$ git grep 'git config' -- t/t9902-completion.sh
	t/t9902-completion.sh:test_expect_success 'git config - section' '
	t/t9902-completion.sh:  test_completion "git config br" <<-\EOF
	t/t9902-completion.sh:test_expect_success 'git config - variable name' '
	t/t9902-completion.sh:  test_completion "git config log.d" <<-\EOF
	t/t9902-completion.sh:test_expect_success 'git config - value' '
	t/t9902-completion.sh:  test_completion "git config color.pager " <<-\EOF


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-28  7:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28  5:49 Missing completions for the 'config' subcommand Manuel Boni
2022-06-28  7:39 ` Ævar Arnfjörð Bjarmason

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.