Earlier quoted context omitted.
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.
You can pipe to xclip to get it into the copy buffer. Then "shift-insert" is often the right paste when "ctrl-v" doesn't work.
Keyboard shortcuts for GNU Readline
171–174 of 174 posts
Re: Keyboard shortcuts for GNU Readline
#172Earlier quoted context omitted.
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
This is now the HN thread in which I found this really cool hack. Thank you.
Re: Keyboard shortcuts for GNU Readline
#173Earlier quoted context omitted.
That's useful, but C-r has its merits too, as you can search for any string in the history. So, even if you run, say, python programs all day, here's a way to find that one time you used a different command line parameter... etc.
You can set bindings for substring search too: "\e[A":history-substring-search-backward "\e[B":history-substring-search-forward
Re: Keyboard shortcuts for GNU Readline
#174Earlier 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.