{"thread":{"id":"35555","subject":"[Feature Request] Did you mean `git ...`? should ask user for feedback, not return to the prompt","startedAt":"2013-12-19T22:38:56Z","lastAt":"2013-12-19T23:17:59Z","messageCount":2,"participants":["Eric Andrew Lewis","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"232264","messageId":"CAMi+fEnVekrWYrG6sGiRPmOXxaJ1-Y9xd83W7Wvw3GwWz8DuBQ@mail.gmail.com","threadId":"35555","inReplyTo":null,"subject":"[Feature Request] Did you mean `git ...`? should ask user for feedback, not return to the prompt","fromName":"Eric Andrew Lewis","fromEmail":"eric.andrew.lewis@gmail.com","sentAt":"2013-12-19T22:38:56Z","receivedAt":"2013-12-19T22:38:56Z","isPatch":false,"sender":{"key":"eric.andrew.lewis@gmail.com","avatar":null},"body":"Git is smart enough to realize when you make a spelling error and\nenter a non-existent git command. Since you probably do mean what it\nsuggests, it follows that the user would want to immediately say “yes,\nI did want to do that,” rather than return to the command line to\nenter the command again.\n\ne.g.\n\n$ git psh\ngit: 'psh' is not a git command. See 'git —help'.\nDid you mean 'push'[y/n]?\n\n--\nEric Andrew Lewis\n"},{"id":"232268","messageId":"20131219231759.GF20443@google.com","threadId":"35555","inReplyTo":"CAMi+fEnVekrWYrG6sGiRPmOXxaJ1-Y9xd83W7Wvw3GwWz8DuBQ@mail.gmail.com","subject":"Re: [Feature Request] Did you mean `git ...`? should ask user for feedback, not return to the prompt","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-12-19T23:17:59Z","receivedAt":"2013-12-19T23:17:59Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"(cc-ing area experts)\nHi,\n\nEric Andrew Lewis wrote:\n\n> Git is smart enough to realize when you make a spelling error and\n> enter a non-existent git command. Since you probably do mean what it\n> suggests, it follows that the user would want to immediately say “yes,\n> I did want to do that,” rather than return to the command line to\n> enter the command again.\n\nYeah, it's a real tease. :/\n\n> e.g.\n>\n> $ git psh\n> git: 'psh' is not a git command. See 'git —help'.\n> Did you mean 'push'[y/n]?\n\nThis is a natural extension to the existing \"ticking time bomb\"\nfeature that can be enabled with\n\n\techo '[help] autocorrect = 50' >>~/.gitconfig\n\nSome value like \"autocorrect = ask\" could mean to prompt, and the\ndefault behavior could be not to prompt (to avoid breaking muscle\nmemory for people used to the usual \"just succeed or fail, don't\ninteract\" behavior) but to mention that configuration in the output to\nmake it easy to discover.\n\nWith that tiny tweak, it sounds good to me.  I stole this idea from\nhttp://thread.gmane.org/gmane.comp.version-control.git/197151/focus=197249\nand the surrounding thread, which also has rough hints toward an\nimplementation.\n\nThanks and hope that helps,\nJonathan\n"}]}