]> git.ipfire.org Git - thirdparty/git.git/commit - help.c
help.c: help.autocorrect=never means "do not compute suggestions"
authorDrew DeVault <sir@cmpwn.com>
Wed, 25 Nov 2020 21:01:45 +0000 (13:01 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 25 Nov 2020 21:02:15 +0000 (13:02 -0800)
commit644bb953ce3251f2868ece6b767949828fa32e44
tree94c5c7e5b5ed2f7c1a49dec418da026f10ff8987
parente31aba42fb12bdeb0f850829e008e1e3f43af500
help.c: help.autocorrect=never means "do not compute suggestions"

While help.autocorrect can be set to 0 to decline auto-execution of
possibly mistyped commands, it still spends cycles to compute the
suggestions, and it wastes screen real estate.

Update help.autocorrect to accept the string "never" to just exit
with error upon mistyped commands to help users who prefer to never
see suggested corrections at all.

While at it, introduce "immediate" as a more readable way to
immediately execute the auto-corrected command, which can be done
with negative value.

Signed-off-by: Drew DeVault <sir@cmpwn.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/help.txt
help.c
t/t9003-help-autocorrect.sh