Live data from Hacker News

SL(1): Cure your bad habit of mistyping

github.com

31–40 of 63 posts

Re: SL(1): Cure your bad habit of mistyping

#32

I so often type "nevermind" instead of "never mind" that I created a shortcut on my computer that replaces the former with the latter. I have met many other people of my generation (early 40s) who also thought it was a single word. I think we were influenced by the popular Nirvana album, which used the single-word spelling.

If enough people spell something "wrong" it automatically becomes the correct (or rather, standard) spelling, and words can have more than one correct spelling, too.

Re: SL(1): Cure your bad habit of mistyping

#33

Embrace your habit of mistyping: https://github.com/nvbn/thefuck#readme

I use that all the time as a shortcut to push new git branches without having to type the whole name.

You can enable tab complete for Git including for branch names.

I don't know how I would live without that. I tend to make rather verbose branch names and typing it all out stuff like push would take forever.

Though, you have a much more fun solution.

Re: SL(1): Cure your bad habit of mistyping

#34

I so often type "nevermind" instead of "never mind" that I created a shortcut on my computer that replaces the former with the latter. I have met many other people of my generation (early 40s) who also thought it was a single word. I think we were influenced by the popular Nirvana album, which used the single-word spelling.

If enough people spell something "wrong" it automatically becomes the correct (or rather, standard) spelling, and words can have more than one correct spelling, too.

True! I've checked the dictionary several times, and we've apparently not hit the tipping point yet.

Re: SL(1): Cure your bad habit of mistyping

#35
SL(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 child in a different process group, then restart the child if the parent sees it do a core dump?

Or launch two children — one of them daemonized — where the daemon attaches a new sl to your terminal if it sees its sibling one die prematurely. You could still get back to an interactive shell with the right signal but sl would keep annoying you by drawing a train over the top.

Re: SL(1): Cure your bad habit of mistyping

#37

Embrace your habit of mistyping: https://github.com/nvbn/thefuck#readme

I use that all the time as a shortcut to push new git branches without having to type the whole name.

In addition to tab complete for branch names, git has a `help.autoCorrect` config item that allows git to automatically correct typos in command names. I weirdly type "git poush" incredibly often, and it's nice for git to pretend I typed "push".

Re: SL(1): Cure your bad habit of mistyping

#39
I was surprised when I first came across this, to know that this was apparently such a common typo - since I don't ever recall doing this particular typo myself, even though I'm prone to character-transposition typos.

But then I realized, I rarely ever do `ls` itself - it's always either `ll` = alias for `ls -lh` or `la` = alias for `ll -A`. And those seem less typo prone, somehow.

Re: SL(1): Cure your bad habit of mistyping

#40

SL(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.

Post reply on HN