3 ms·
"Finally, there is no easy way to edit text that we enter in the terminal. Going to the end/beginning of the line depending which place it’s closer to the point
by dhconnelly 15y ago
"Finally, there is no easy way to edit text that we enter in the terminal. Going to the end/beginning of the line depending which place it’s closer to the point you want to edit, and then moving your cursor over one character at a time to get to the destination - sounds familiar? I was so frustrated with that, that I made it a habit to enter all the commands in text editor then copy & paste to the terminal window!"
You do know there are emacs and vi modes for bash, right?
http://www.hypexr.org/bash_tutorial.php#emacs http://www.hypexr.org/bash_tutorial.php#emacs
http://www.hypexr.org/bash_tutorial.php#vi http://www.hypexr.org/bash_tutorial.php#vi
Seriously, the command line is a fantastic programming environment. Learn more bash and your life will be better.
- czzarr 15y agoyou just made my day sir. I never knew vi mode existed for bash.
- niznikpawel 15y agoHa, amazing someone just learned something :).
- bumeye 15y agoI use emacs mode for bash, which is default on mac. Then i bind 'option cursor left' to \033b and 'option cursor right' to \033f. Voila, next and previous word using alt+arrow keys. Good enough for me :).
- gte910h 15y agoDude, I owe you a steak. Holy crap.