简体   繁体   中英

How to copy string from Tmux in an easy way on macOS?

On macOS, if use bash or zsh shell, use Ctrl+C can copy string to clipboard immediately. But at Tmux model, it can't. Should press option key, then use mouse select string, press Ctrl+C. It's a little complex. Is there a short way to do if set any option in Tmux config?

I think tmux = terminal multiplexor : some terminals inside another terminal. If Ctrl+C works when zsh is inside a native terminal ( iTerm or xterm ), but Ctrl+C doesn't work when zsh is inside tmux ; then, that Ctrl+C is the feature of that native terminal ( iTerm or xterm ) not a feature of zsh or bash .

It is impossible to assign a same key shortcut for BOTH native terminal ( iTerm or xterm ) AND tmux (which runs inside THAT iterm or xterm ).

If you prefer to use tmux (nearly) all the time, then you have to disable Ctrl+C key shortcut in the native terminal ( iTerm or xterm ), then set it in tmux . But I think most of users wont do that. They have to select a different set of key shortcuts for tmux without changing the native terminal settings, which they already get used to for long time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM