Thread (1 message) 1 message, 1 author, 2022-07-13

Re: [PATCH] config.txt: add completion for include, includeIf

From: Junio C Hamano <hidden>
Date: 2022-07-13 19:52:32

"Manuel Boni via GitGitGadget" [off-list ref] writes:
From: Manuel Boni <redacted>

Git config's tab completion does not yet know about the "include"
and "includeIf" sections, nor the related "path" variable.

Add tab completion support for the aforementioned items,
along with two new tests, based on the existing ones,
specifically for this completion. Variable completion only works
for "include" for now.
You may have started this work for tab completion, but I think you
should describe it as adding missing documentation (this comment
extends to the title of the patch, too).  The work to teach "tab
completion" about the variables "git config" can take has done long
time ago, and the work by this patch to add description for
<include> and <includeIf> is used as an input to that previous work,
which results in "git config inc<TAB>" to be command line completed.
Credit for the ideas behind this patch goes to
Ævar Arnfjörð Bjarmason.

Signed-off-by: Manuel Boni <redacted>
Based-on-patch-by: Ævar Arnfjörð Bjarmason [off-list ref]
The order of these two is backwards, no?  Ævar may have written
something that inspire you to arrive at this version, which you
signed off before sending it out.
+include.path::
+
+includeIf.<condition>.path::
Losing the extra blank line will make it clearer, if your intention
is that the next lines apply to both of the above two.
+	Special variables to include other configuration files. See
+	the "CONFIGURATION FILE" section in the main
+	linkgit:git-config[1] documentation.
Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help