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?
1 Answer
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.
flaglink at the bottom of your Q and ask the moderator to move it. Please don't post the same Q on 2 different sites. Please read stackoverflow.com/help/on-topic , stackoverflow.com/help/how-to-ask , stackoverflow.com/help/dont-ask and stackoverflow.com/help/mcve before posting more Qs here. GoodLuck