SL(1): Cure your bad habit of mistyping
51–60 of 63 posts
Re: SL(1): Cure your bad habit of mistyping
#52Or embrace it... I don't seem to mistype ls often enough to care, but my ~/.alias has a few things of this sort # some common typos alias grpe grep alias gpre grep alias mroe more alias mreo more alias rmeo more
zsh `setopt correct` is pretty helpful with these kinds of typos.
I believe I experienced this kind of feature with fish and it was one of the reasons I didn't like it. (Most things cannot be user configured away in fish).
Re: SL(1): Cure your bad habit of mistyping
#53Or embrace it... I don't seem to mistype ls often enough to care, but my ~/.alias has a few things of this sort # some common typos alias grpe grep alias gpre grep alias mroe more alias mreo more alias rmeo more
and: alias cd..="cd .." alias ..="cd .."
Re: SL(1): Cure your bad habit of mistyping
#54I have this in my `.zshrc` on my personal machine. I get a kick out of it: ``` function command_not_found_handler() { figlet "lol, $1" } ``` (I think the bash equivalent is `command_not_found_handle`). This overrides the function that usually prints the `zsh: command not found: foo` message, and instead, mocks you, by printing "lol, foo" (but in big ol' figlet letters). SL is in a similar, but admittedly much more el…
> claer
zsh: correct 'claer' to 'clear' [nyae]? n
zsh: command not found: claer
I am guilty of not reading the docs, but I learnt by experience that n/y/a/e stands for no (run without correction)/yes (correct)/abort (don't run)/edit (manually/interactively)Re: SL(1): Cure your bad habit of mistyping
#55Earlier quoted context omitted.
I use that all the time as a shortcut to push new git branches without having to type the whole name.
`git push -u origin HEAD` pushes the current branch to `origin` with the same name you have locally. You could even add an alias for that.
Re: SL(1): Cure your bad habit of mistyping
#56I added an alias 'll'. alias ll='ls -Glopa' and while I was at it alias cls='clear && printf \\e[3J' Yes, I grew up using MS DOS, why do you ask?
Does not the -o make both the -G and -l unnecessary?
Re: SL(1): Cure your bad habit of mistyping
#57I regularly mistype “myself” as “mysql” and vice versa. It’s like my brain registers the “mys”, figures my fingers have it covered, and checks out.
Re: SL(1): Cure your bad habit of mistyping
#58Re: SL(1): Cure your bad habit of mistyping
#59Earlier quoted context omitted.
zsh `setopt correct` is pretty helpful with these kinds of typos.
This sounded interesting but too magicky to me and I did a google search. Most of the top results are about how to disable or limit it. :) I believe I experienced this kind of feature with fish and it was one of the reasons I didn't like it. (Most things cannot be user configured away in fish).
Re: SL(1): Cure your bad habit of mistyping
#60SL(1): Learn the muscle-memory to send SIGQUIT all the time Part of this tool’s “charm” is that it traps SIGINT so you truly are forced to watch the animation as a punishment for bad typing, even if you try to send it SIGINT from your keyboard by typing control-C. Control-backslash sends SIGQUIT on the other hand. This signal cannot be trapped. Perhaps sl could launch a parent process and a child process, put the chi…
> Control-backslash sends SIGQUIT on the other hand. This signal cannot be trapped. Yes, it can.