{"thread":{"id":"58076","subject":"Missing completions for the 'config' subcommand","startedAt":"2022-06-28T05:49:59Z","lastAt":"2022-06-28T07:42:42Z","messageCount":2,"participants":["Manuel Boni","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"457987","messageId":"CAKP36g5G6KBEn8C+H8rxj5atfm2RKTfLAPtVveqg-8r4nqbxRg@mail.gmail.com","threadId":"58076","inReplyTo":null,"subject":"Missing completions for the 'config' subcommand","fromName":"Manuel Boni","fromEmail":"ziosombrero@gmail.com","sentAt":"2022-06-28T05:49:20Z","receivedAt":"2022-06-28T05:49:59Z","isPatch":false,"sender":{"key":"ziosombrero@gmail.com","avatar":null},"body":"What did you do before the bug happened? (Steps to reproduce your issue)\n1) Start Git Bash, and optionally use 'set -x';\n2) type 'git config incl';\n3) attempt to tab-complete the last word.\n\nWhat did you expect to happen? (Expected behavior)\nThe list of available completions should include the 'include' and\n'includeIf' expressions.\n\nWhat happened instead? (Actual behavior)\nThe expressions mentioned previously are not present.\n\nWhat's different between what you expected and what actually happened?\nThe list of completions for the 'config' subcommand does not contain\nall the available sections.\n\n[System Info]\ngit version:\ngit version 2.36.1.windows.1\ncpu: x86_64\nbuilt from commit: e2ff68a2d1426758c78d023f863bfa1e03cbc768\nsizeof-long: 4\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nuname: Windows 10.0 19044\ncompiler info: gnuc: 11.3\nlibc info: no libc information available\n$SHELL (typically, interactive shell): C:\\Program Files\\Git\\usr\\bin\\bash.exe\n\n\n[Enabled Hooks]\nnot run from a git repository - no hooks to show\n\nThank you for your attention.\n"},{"id":"457988","messageId":"220628.86a69xgro2.gmgdl@evledraar.gmail.com","threadId":"58076","inReplyTo":"CAKP36g5G6KBEn8C+H8rxj5atfm2RKTfLAPtVveqg-8r4nqbxRg@mail.gmail.com","subject":"Re: Missing completions for the 'config' subcommand","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-06-28T07:39:47Z","receivedAt":"2022-06-28T07:42:42Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Tue, Jun 28 2022, Manuel Boni wrote:\n\n> What did you do before the bug happened? (Steps to reproduce your issue)\n> 1) Start Git Bash, and optionally use 'set -x';\n> 2) type 'git config incl';\n> 3) attempt to tab-complete the last word.\n>\n> What did you expect to happen? (Expected behavior)\n> The list of available completions should include the 'include' and\n> 'includeIf' expressions.\n>\n> What happened instead? (Actual behavior)\n> The expressions mentioned previously are not present.\n>\n> What's different between what you expected and what actually happened?\n> The list of completions for the 'config' subcommand does not contain\n> all the available sections.\n>\n> [System Info]\n> git version:\n> git version 2.36.1.windows.1\n> cpu: x86_64\n> built from commit: e2ff68a2d1426758c78d023f863bfa1e03cbc768\n> sizeof-long: 4\n> sizeof-size_t: 8\n> shell-path: /bin/sh\n> feature: fsmonitor--daemon\n> uname: Windows 10.0 19044\n> compiler info: gnuc: 11.3\n> libc info: no libc information available\n> $SHELL (typically, interactive shell): C:\\Program Files\\Git\\usr\\bin\\bash.exe\n>\n>\n> [Enabled Hooks]\n> not run from a git repository - no hooks to show\n\nSomething like this patch would fix this, since we just generate this\ncompletion list by scraping Documentation/config/*.txt. See\ngenerate-configlist.sh at the top-level:\n\t\n\tdiff --git a/Documentation/config/includeif.txt b/Documentation/config/includeif.txt\n\tnew file mode 100644\n\tindex 00000000000..7f7513e9197\n\t--- /dev/null\n\t+++ b/Documentation/config/includeif.txt\n\t@@ -0,0 +1,5 @@\n\t+include.path::\n\t+includeIf.<condition>.path::\n\t+\tSpecial variables to include other configuration files. See\n\t+\tthe \"CONFIGURATION FILE\" section in the main\n\t+\tlinkgit:git-config[1] documentation.\n\nIf you're willing to make this your first patch to git.git that would be\ngreat:) I think this with something to give it basic test coverage would\nbe nice, you could use these tests as a template:\n\t\n\t$ git grep 'git config' -- t/t9902-completion.sh\n\tt/t9902-completion.sh:test_expect_success 'git config - section' '\n\tt/t9902-completion.sh:  test_completion \"git config br\" <<-\\EOF\n\tt/t9902-completion.sh:test_expect_success 'git config - variable name' '\n\tt/t9902-completion.sh:  test_completion \"git config log.d\" <<-\\EOF\n\tt/t9902-completion.sh:test_expect_success 'git config - value' '\n\tt/t9902-completion.sh:  test_completion \"git config color.pager \" <<-\\EOF\n\n"}]}