To have the vim-like, mouseless copy and paste in tmux, I have this snippet in my
setw -g mode-keys vi unbind [ bind Escape copy-mode unbind p bind p paste-buffer bind -t vi-copy v begin-selection bind -t vi-copy y copy-selection
Suppose I've selected my text of interest. Now, instead of
copy-selection with y, I want to edit my selection and echo the edited version to a local file with g.
Trying to pipe the output of
saveb to a shell command, I tried the following, but to no avail.
(forget about editing for now; just echoing)
bind-key g saveb - | run-shell 'xargs echo > ~/my-selection.txt