I just found myself asking me that question. Allright, I am a nerd and I'm fine with that. Allright, I'm very persistent about orderliness and I've come to accept that as a part of my personality. Now, when using the commandline and bash in particular and you've written a command that you decide that you don't want to execute, how do you go about clearing the cli row? Out of the possibilities I know I could choose CTRL+c which would be kinda natural and quite easy to type too. A perfectly fine alternative. But *no*. There's another way to go about it; CTRL+u. A command which tells bash to *erase* to the beginning of the line. I feels alot better. You erase the characters you don't want, no sloppy discard-all-in-one. And it's important to me. Really. I keep my ~/tmp clean with reasonably regular intervals. Really not needed either. These are not the only examples. Randomness and disorder should be the the state which demands the least energy to maintiain, no? Sometimes I wonder from whence the impetus originates...
Comments
also ^W
There is also ^W which only erases one word. If you like that kind of power.. :)
Yes, I love that kind of
Yes, I love that kind of power. Didn't know about that one! I have been using Alt + Backspace until now. Will do my best to switch (=
I'm on ZSH, but these should
I'm on ZSH, but these should work in Bash as well:
Ctrl+K-- delete from the cursor onwardsCtrl+A-- go to start of line (e.g. for the powerfulCtrl+A Ctrl+Kcombo ;) hehe)Ctrl+E-- go to end of lineCtrl+F-- go forward one characterAlt+F-- go forward one "word"Ctrl+B-- go backward one characterAlt+B-- go backwards one "word"Ctrl+D-- delete one characterAlt+D-- delete one "word"See the consistency of
CtrlandAlt? I find that very nifty :]Ctrl+A Ctrl+K combo or Ctrl+E
Ctrl+A Ctrl+K combo or Ctrl+E Ctrl+U for another flavor of the same stuff.
Sweet! Thanks! :D
Sweet! Thanks! :D