Hacker News new | ask | show | jobs
by cryptonector 1910 days ago
It's three. The shell doesn't do copy-paste, unless you mean the terminal emulator, but then that's copy-paste as in "the OS". This is actually great because you get many more cut buffers this way. There used to be a utility called xcb(1) to manage X11 cut-buffers (yes, there's more than one!), but even so, that requires too much mouse use. With tmux and vi/vim/emacs you get many cut-buffers. If, like me, you run a $EDITOR per-pane, then the tmux cut buffers are most useful when cutting and pasting between panes, while $EDITOR cut buffers are most useful when cutting and pasting within a file.
1 comments

You can copy and paste in bash and zsh with emacs keybindings (by default). I will sometimes start typing git commit -m "something...", then hit ctrl-a ctrl-k, then stage another file, and then later ctrl-y to finish the commit. But ctrl-q basically does that same thing, in a nicer way. I don't know how to get bash/zsh to integrate with the system clipboard.