Hi,

These six patches teach the choose-* commands to use -F for the format
option.  In doing this, I've also touched on the existing list-* commands
because both of them used the same default templates.

To that end, I've shoved some #defines in tmux.h to centralise the default
formats and referenced them from both the choose/list for each commands.
This might not be that desired -- the only one which didn't fit this pattern
was the {choose,list}-windows command which used a different format template
between the two.  But I've tried to make them the same for simplicity.

In converting over the {choose,list}-buffer commands, I've added two new
format options:

#{buffer_size}
#{buffer_sample}

I've also added:

#{window_panes}

which counts the number of panes in a given window.  Used by choose-window
command.

These patches are a precursor to a larger set of patches for choose-tree,
but I wanted to get these out the way first, as they're useful.

Any questions, do ask.

Note that I'm having my tooth out in a few days, so might be a bit slow to
reply.  If there's trivial fixups only needed to these, I'd rather these
were done without my approval.

Kindly,

-- Thomas Adam

Thomas Adam (6):
  Add default format template macros
  Convert {choose,list}-buffers to use formats
  Teach {choose,list}-client to use fomats
  Teach {choose,list}-sessions to use formats
  Convert {choose,list}-window to use formats
  Update man page for format work.

 trunk/cmd-choose-buffer.c  |   24 +++++++++++++++++-------
 trunk/cmd-choose-client.c  |   26 ++++++++++++++++++--------
 trunk/cmd-choose-session.c |   31 ++++++++++++++++---------------
 trunk/cmd-choose-window.c  |   41 ++++++++++++++++++-----------------------
 trunk/cmd-list-buffers.c   |   25 ++++++++++++++++++-------
 trunk/cmd-list-clients.c   |    9 ++-------
 trunk/cmd-list-sessions.c  |   10 ++--------
 trunk/cmd-list-windows.c   |   12 ++----------
 trunk/format.c             |   12 ++++++++++++
 trunk/tmux.1               |   44 ++++++++++++++++++++++++++++++++++++--------
 trunk/tmux.h               |   18 ++++++++++++++++++
 11 files changed, 159 insertions(+), 93 deletions(-)

-- 
1.7.10


------------------------------------------------------------------------------
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

Reply via email to