3 ms·
I agree that 'prompt' should be the value to set if you want git autocorrect to work for you. I'd however want that the Y is the default rather than the N, so t
by politelemon 2y ago
I agree that 'prompt' should be the value to set if you want git autocorrect to work for you. I'd however want that the Y is the default rather than the N, so that a user can just press enter once they've confirmed it.
In any case it is not a good idea to have a CLI command happen without your approval, even if the intention was really obvious.
- misnome 2y agoYes, absolutely this. If I don’t want it to run, I will hit ctrl-c.
- junon 2y agoIf prompt is the default, mistyped scripts will hang rather than exit 1 if they have stdin open. I think that causes more problems than it solves.
- jzwinck 2y agoThat's what isatty() is for. If stdin is not a TTY, prompting should not be the default. Many programs change their defaults or their entire behavior based on isatty().
- junon 2y agoisatty() is spoofed in e.g. Make via PTYs. It's a light check at best and lies to you at worst.
- darthwalsh 2y agoIf make is going to spoof the PTY, it should take responsibility for answering the autocorrect prompt
- junon 2y agoThere's no "prompt". That's not how TTYs work. Make has no idea the program is waiting for any input.