"Shame, then, that even serious command line hackers never bother learning about its capabilities, as they can supercharge your command line productivity." Because it is really confusing if you are not an emacs user.
Not at all. bash readline is probably the productivity enhancer skill a developer (or system admin) can develop. Simple things like copy and paste without hitting a mouse. This will make you _prefer_ the cli as it is not slowing you down anymore.
Keyboard shortcuts for GNU Readline
161–170 of 174 posts
Re: Keyboard shortcuts for GNU Readline
#162Earlier quoted context omitted.
Not at all. bash readline is probably the productivity enhancer skill a developer (or system admin) can develop. Simple things like copy and paste without hitting a mouse. This will make you _prefer_ the cli as it is not slowing you down anymore.
Yes please. Teach me how to copy output of previous command into clipboard using keyboard only and I will love you forever. Bonus if I can have a cursor to only select partial lines of the output.
Re: Keyboard shortcuts for GNU Readline
#163> C-e, C-f, M-b, M-f Why these strange shortcuts when any keyboard has arrow keys and they can be used with a control modifier to move by words? I can understand why to use C-a, C-e, because laptop keyboards tend to have "Home" and "End" keys in strange places, but those... And Emacs documentation for some reason insists on using C-e, C-f instead of arrow keys.
C-f(orwards) C-b(ackwards) The reason you use them is that they allow you to not leave the home row. So say you're writing something and need to move back and delete a mistype, it's much faster to do that with C-b C-b C-b backspace M-f than moving your right hand to the arrow keys and moving it back to type the letter and then moving it to the arrow keys again. Now, lot's of people can't be bothered to take the time…
I would argue that it takes more then a few weeks, be prepared to wait/invest several months into it, but it is absolutely worth the investment. 100%.
Re: Keyboard shortcuts for GNU Readline
#164Has anyone managed to get an RSS Feed from masteringemacs.org ?
Re: Keyboard shortcuts for GNU Readline
#165For anyone using a Mac, the basic cursor movement commands available in readline and emacs—C-f, C-b, C-a, C-e, C-n, C-p—are also available in virtually any text input in any program, namely web browser inputs, url bars, and textareas, as well as all system UIs. Once you get used to using these shortcuts that means you can compose and edit text anywhere without ever moving your hands. I recently switched to using Linu…
So the configuration file is ~/.editrc.
man editrc
Note also that to have a full mapping of keys available to you, you have to be aware of the tty settings (see stty), the terminal emulator and the GUI environment in which it is running. I would appreciate a tool that would dump all this in a comprehensive list.
Re: Keyboard shortcuts for GNU Readline
#166Earlier quoted context omitted.
Not at all. bash readline is probably the productivity enhancer skill a developer (or system admin) can develop. Simple things like copy and paste without hitting a mouse. This will make you _prefer_ the cli as it is not slowing you down anymore.
Yes please. Teach me how to copy output of previous command into clipboard using keyboard only and I will love you forever. Bonus if I can have a cursor to only select partial lines of the output.
Re: Keyboard shortcuts for GNU Readline
#167Earlier quoted context omitted.
>by far the most useful shortcut for me is Ctrl-r I rarely ever use Ctrl-r since I usually know the starting part of the command I want. So, I type those starting characters and use up/down arrow keys, courtesy these lines in `~/.inputrc` "\e[A": history-search-backward "\e[B": history-search-forward
a really cool hack I found in an HN thread long ago was to stick "hashtags" (aka bash end-of-line comments) at the ends of commands you want to find in your history quickly: sudo systemctl restart myservice #bounce and then ctrl-r and type your hashtag to get right to it
Re: Keyboard shortcuts for GNU Readline
#168In case you were looking for more examples of "open source being held together by one tireless person somewhere" (obligatory xkcd comic link omitted).
Re: Keyboard shortcuts for GNU Readline
#169Less Useful Key Bindings: C-l Clear screen This is the one I use most frequently. All day every day. I hate clutter and unless I need to refer to the output from the previous commands, it's gone.
Re: Keyboard shortcuts for GNU Readline
#170For anyone using a Mac, the basic cursor movement commands available in readline and emacs—C-f, C-b, C-a, C-e, C-n, C-p—are also available in virtually any text input in any program, namely web browser inputs, url bars, and textareas, as well as all system UIs. Once you get used to using these shortcuts that means you can compose and edit text anywhere without ever moving your hands. I recently switched to using Linu…
[0] for example in the quakelive console