3 ms·
I enabled autocorrect (set a 3sec) a year ago and have the following observations about it: 1. it does not distinguish between dangerous and safe actions 2. i
by catlifeonmars 2y ago
I enabled autocorrect (set a 3sec) a year ago and have the following observations about it:
1. it does not distinguish between dangerous and safe actions
2. it pollutes my shell history with mistyped commands
Reading this article gave me just enough of a nudge to just disable it after a year.
- layer8 2y agoIf anything, it’s better to set up aliases for frequent typos. (Still “pollutes” the shell history of course.)
- darkwater 2y agoAbout 2, well, you are the actual polluter, even if you just scroll back in history andnuse the same last wrong command because it works anyway.
- catlifeonmars 2y agoWell to put it into context, I use fish shell, which will only save commands that have an exit code of 0. By using git autocorrect, I have guaranteed that all git commands have an exit code of 0 :)
- fsckboy 2y agowow, our brains work differently, how can you smile in that circumstance? :) It's a terrible idea of fish not to save errors in history (even if the way bash does it is not optimal, ignoring/obliterating the error return fact) because running a command to look up the state of something can easily return the state you are checking along with an error code. "What was that awesome three letter TLD I looked up yesterday that was available? damn, not a valid domain is an error code" and just like that SEX.COM slips through your grasp, and your only recourse would be to hijack it. but it's compoundedly worse to feel like the problem is solved by autocorrect further polluting your history. I would not want to be fixing things downstream of you, where you would be perfectly happy downstream of me.
- darkwater 2y agoTIL. And what about programs that don't have autocorrect? How does Fish handle the "up arrow and fix mistyped command" flow?
- bobbylarrybobby 2y agoThe issue is if you accept the wrong command instead of retyping it correctly, you never get the correctly spelled command into your history — and even worse, you don't get it to be more recent than the mistyped command.