Live data from Hacker News

SL(1): Cure your bad habit of mistyping

github.com

41–50 of 63 posts

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

#41

Or 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

#42
post #7

After you think you are perfect, then there’s suicide linux: https://github.com/tiagoad/suicide-linux “Any time - any time - you type any remotely incorrect command, the interpreter creatively resolves it into rm -rf / and wipes your hard drive.”

This could be neat for production environments in a kind of chaos monkey sense

This is the new North Star for my system architecture. Another win for DevOps! Thank you.

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

#43

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.

`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

#44

Or 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

the times I've typed .. dicker or focker, ducker ... or the combination of the last two .. bleh

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

#46

Or 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.

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

#47
My first job was at a company where this was installed system wide on all remote linux boxes. Everytime you type sl it would take over the whole terminal for a couple of seconds leaving you unable to do anything. This was before docker & devops era so we used to ssh into machines at lot.

It was the thing that prompted me to learn tmux so I could switch tabs without needing multiple putty windows.

The original use case went away long back, but I use tmux still, so thanks I guess :)

Post reply on HN