On Thu, May 20, 2010 at 08:17:57PM -0700, Micah Cowan wrote: > Okay, I now understand why that is: copy-selection needs to know which > session's paste buffers should be affected, and it gets this information > from the passed-in instance of "struct client", which of course is NULL > for direct shell commands. So I need it to get it the session > information from elsewhere; probably the TMUX env var.
Maybe we need an option to send-keys or to copy-mode to send the commands (I wish I hadn't reused -t to lsk now, but something similiar). > > -mjc > > On 05/20/2010 03:34 PM, Micah Cowan wrote: > > I've been playing around with scripting certain actions in copy-mode, > > and have run into what I believe to be a bug in recent CVS tmux. > > > > If I run the command: > > > > tmux copy-mode \; send-keys 0 Space e Enter > > > > (which in vi bindings should jump to the start of the line, start > > selection, move to the end of the word, and copy-selection) > > > > It does everything it should, _except_ the Enter. The same is true if I > > have two panes open, and run: > > > > tmux send-keys -t :.- 0 Space e Enter > > > > where the other pane is already open in copy-mode > > > > If the other pane is _not_ in copy-mode, the Enter is sent through fine. > > > > These constructs _do_ work directly from the : prompt, or when bound to > > keys (and then triggering the bound key). > > > > . > > > > Side note: I find it awkward to be forced to do copy-mode scripting via > > send-keys; it would be much nicer if it were possible to use the correct > > copy-mode commands directly; especially since I can hardly write a > > generic script if I'm reliant on the user's key-bindings being set a > > certain way. > > > > > -- > Micah J. Cowan > http://micah.cowan.name/ > > ------------------------------------------------------------------------------ > > _______________________________________________ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users ------------------------------------------------------------------------------ _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users