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>
This commit is contained in:

committed by
Junio C Hamano

parent
e31aba42fb
commit
644bb953ce
@ -8,13 +8,14 @@ help.format::
|
||||
the default. 'web' and 'html' are the same.
|
||||
|
||||
help.autoCorrect::
|
||||
Automatically correct and execute mistyped commands after
|
||||
waiting for the given number of deciseconds (0.1 sec). If more
|
||||
than one command can be deduced from the entered text, nothing
|
||||
will be executed. If the value of this option is negative,
|
||||
the corrected command will be executed immediately. If the
|
||||
value is 0 - the command will be just shown but not executed.
|
||||
This is the default.
|
||||
If git detects typos and can identify exactly one valid command similar
|
||||
to the error, git will automatically run the intended command after
|
||||
waiting a duration of time defined by this configuration value in
|
||||
deciseconds (0.1 sec). If this value is 0, the suggested corrections
|
||||
will be shown, but not executed. If it is a negative integer, or
|
||||
"immediate", the suggested command
|
||||
is run immediately. If "never", suggestions are not shown at all. The
|
||||
default value is zero.
|
||||
|
||||
help.htmlPath::
|
||||
Specify the path where the HTML documentation resides. File system paths
|
||||
|
Reference in New Issue
Block a user