Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bind more than one command to single key in screen?

Tags:

gnu-screen

how can i bind more than one command to a single key in gnu-screen? I want to combine the two mappings

bind c copy
bind b eval "writebuf" "exec sh -c 'xsel --clipboard < /tmp/screen-exchange'"

to a single one-key mapping. How can this be done?

Does anyone know a good tutorial on this advanced configuration/scripting stuff for gnu-screen?

Thanks in advance, Chris

like image 599
Chris Avatar asked Nov 13 '11 11:11

Chris


1 Answers

Pass each command as a separate argument to eval, e.g., eval "echo foo" "echo bar". In your given scenario, I would think that just adding copy after eval would do what you want.

like image 100
Arkku Avatar answered Sep 20 '22 09:09

Arkku