Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
help: add prompt-yes setting for autocorrect
The help.autocorrect functionality is really useful, saving frustration when a dev fat-fingers a command, and git has a pretty good idea what was originally intended. The config settings are a nice selection, with "prompt" asking the user to confirm that they want to run the assumed command. However, with "prompt", the choice defaults to "No" - that is, hitting return will _not_ run the command. For me at least, if git is confident it knows which command I wanted, it's usually right, and the golden path would be to run the command. Therefore this patch adds "prompt-yes" as a counterpart config setting for help.autocorrect, which does the same as "prompt", but defaults to "Yes" - hitting return will run the assumed command. I have not added any tests because the test suite doesn't have any tests (that I could find) for the "prompt" behaviour - I'm assuming this is because it's hard/impossible to simulate the interactive terminal prompt Signed-off-by: Chris Howlett <[email protected]>
- Loading branch information