3 ms·
Would be nice to have some form of autocorrect directly in the shell, especially if it was aware of common programs and so could also autocorrect options. Obvio
by ryandrake 10y ago
Would be nice to have some form of autocorrect directly in the shell, especially if it was aware of common programs and so could also autocorrect options. Obviously we could think of a few cases with destructive outcomes--but that doesn't make it a bad feature.
git stauts
I mean, git knows enough to ask me "Did you mean this? status".
- hashhar 10y agoAdd this to gitconfig file. It will automatically run the correct command after displaying what it is after a delay. The value is in 0.1s (centiseconds) of seconds. So 20 means 2 seconds. [help] autocorrect = 20 OR run git config --global help.autocorrect 20
- ryandrake 10y agoWow, great tip, thanks. One command down, hundreds to go.
- hashhar 10y agoI once set up a schedule where I would open the gitconfig manpage and read at least one section of the settings. My gitconfig file growed to over 200 lines then. Quite a lot of stuff isn't very helpful in there though.
- Pxtl 10y agoWouldn't those be deciseconds? Also wtf unit. Use Millis or seconds as a float. Yay Linus making sure that git only makes sense to wizards like him.
- hashhar 10y agoI don't know. I'm confused as is. I really hate when people break: 1. Conventional units. 2. Don't follow the XDG basedir spec for config files. 3. Make inconsistent command line flags. 4. Don't allow control of color output using a flag thinking they are smarter than me.
- LnxPrgr3 10y agoThe Linux kernel seems to have a centisecond obsession too. Probably from way back when HZ was 100 and your computer woke up once every centiseecond to make sure it still had nothing to do.
- derefr 10y agoBesides this, I feel quite reliant on Ubuntu's "you don't have $CMD, but you would if you installed $PKG" suggestions (https://launchpad.net/ubuntu/+source/command-not-found https://launchpad.net/ubuntu/+source/command-not-found). A real autocorrect should probably know about all the systems I use, instead of just the one I'm actively using, and help me translate commands from syntax I "expect" to syntax that works for that system. (e.g. translating my zsh pipelines to bash pipelines; suggestion combinations of commands that can substitute for missing builtins; translating between old GNU tar/ps syntax and old BSD tar/ps syntax...)
- eric_h 10y ago> git stauts I added that as an alias in my git config. Even though I usually just type git st (another alias I added), sometimes my fingers type all the letters out and still fuck it up. Of course, as I'm sure many of you do, too, I've also got a bunch of even shorter bash aliases like gpp (git pull --rebase && git push)