Thanks for this but I think we do not want two ways to do this. Iterm2 is 
actively developed - did you consider contributing support for the xterm 
mechanism there?

-------- Original message --------
From: John Whitley <whit...@bangpath.org> 
Date: 11/08/2013  19:09  (GMT+00:00) 
To: tmux-users@lists.sourceforge.net 
Subject: iTerm2 support for set-clipboard 
 
I note that the set-clipboard window option is currently hardcoded to work with 
xterm. iTerm2 provides a similar escape code[1] for setting the system 
clipboard. I'd like to see support for this added to tmux and am willing to 
work up a patch for it.  FWIW, I'm not currently using the tmux-iTerm2 
integration; the above discussion applies to "stock" tmux as used with iTerm2.

Here's a straw-man proposal for how this might work:

1. Add a new window option, e.g. 'clipboard-provider'.  Valid values are 
''iterm2', 'xterm'.  
   Default is 'xterm'.
2. 'set-clipboard' works as it currently does, now using the mechanism from 
   'clipboard-provider'.


Notes:

An 'auto' value for 'clipboard-provider' would be nice, but may be tricky to 
implement reliably.  E.g. is there a decent way to determine the terminal 
environment a window is created under?  What happens when a window is attached 
in two locations (e.g. pair-programming, one user in xterm, another in iTerm2)? 
 This could be explored in a separate patch.

The new option 'clipboard-provider' could be dropped in favor of adding values 
to 'set-clipboard', e.g. [ on | off | xterm | iterm2 ].  In that case 'on' 
would be an alias for 'xterm' for backwards compatibility.

A related (or alternative) idea is an option to configure set-clipboard to work 
like copy-pipe, directing the selection to an external tool.

Thoughts?

-- John

[1] See "Copy to Clipboard" at 
https://code.google.com/p/iterm2/wiki/ProprietaryEscapeCodes
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourc
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to