Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 2/9] completion: optimize refs completion

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:15

SZEDER Gábor [off-list ref] writes:
... If we use the default IFS containing an SP and append a SP to
possible completion words by 'compgen -S " "' (or by word="$word ", as
in __gitcomp_1()), then that SP will be promply stripped off when
compgen's output is stored in the COMPREPLY array.  Using an IFS
without SP keeps those SP suffixes.
Ahh, then I am perfectly fine with the "nl" in its name.

This is a function that unconditionally completes with trailing separator,
avoiding the cost of having to inspect each element, but the user needs to
keep in mind that the elements in the input must be separated with NL, so
ideally the name needs to convey both of these points---dropping "nl" was
a bad suggestion.

Thanks for a clear explanation.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help