On 14/08/12 5:39 PM, Thomas Adam wrote: > On Tue, Aug 14, 2012 at 05:33:59PM +1000, Stephen Thirlwall wrote: >> Can the choose-list command be executed from the command-line? >> >> eg. tmux choose-list -l$( generate-list-somehow ) >> >> I only get a 'must be run interactively' message when I try this. I can bind >> it >> to a key, but then the input list seems to be fixed at bind-time. > > That's due to the window pane being put in a special mode. I suppose > lifting that restriction's possible, but needs a bit of thought.
Dynamically creating the list contents would be the key feature of your choose-list command wouldn't it? Would specifying the command as an argument work instead? tmux choose-list -c 'generate-list-command' ? Then you could have: bind $key choose-list -c 'generate-completions' 'send-keys "%%"' With a generate-completions script handling #1 & #2 below, and spitting out the list. >> Also, does tmux have commands to: >> 1) dump the contents (and history) of a pane? > > capture-pane Perfect. Thanks. (Sinbad - show-buffer or save-buffer to retrieve the contents here) > >> 2) find the string under the cursor in a given pane, or even just the >> position >> of the cursor (possibly as an index into the pane contents above) > > No. A format specifier could handle this somehow. Steve ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users