From: Thomas Adam <thomas.a...@smoothwall.net> Hi,
The following two patches should hopefully be self-explanatory. They're written against code which is in OpenBSD's tmux but yet in the portable version, so whomever is looking at these should bear that in mind when trying to compile this against sourceforge. Given I wrote the prerequisite code which is already in OpenBSD's tmux, this was easier for me to control. The first patch revamps the choose-tree command from before, by introducing -S and -W flags to indicate whether sessions and/or windows should be considered. This then allows the older choose-{window,session} commands to be wrappers around choose-tree, which the second patch addresses. Note that there's probably a couple of things to work out yet, such as whether or not the changes to the choose-{window,session} wrappers are acceptible, The notable difference is that: * "-F" for both has been removed in favour of the switched used by choose-tree to indicate which format to use. * The [template] option for choose-{window,session} used to be free-form (i.e., argv[0]) but is now required as an option to either command. * That choose-{window,session} without any options passed to it defaults to showing either windows or sessions depending on which command was issued. Whilst this is in keeping with how choose-{window,session} currently works, should this be enforced instead by always requiring choose-{window,session} to require -W or -S, even though the wrapper command already makes such flags redundant? This would mean forcing: choose-session -S choose-window -W for example. * I've removed ACS line drawing for window indentation when called without -S -- and for when calling choose-window directly in keeping with the current behaviour. All in all, the likely breakages here are with -F and [template] when calling choose-{window,session}. Hopefully that's an acceptible change, I do not know, but I've done my best to make this as non-disruptive as I could. Questions, do please ask. Kindly, -- Thomas Adam Thomas Adam (2): Add the choose-tree command choose-{session,window} as wrappers to choose-tree trunk/Makefile.am | 3 +- trunk/cmd-choose-tree.c | 220 +++++++++++++++++++++++++++++++++++++++++++++++ trunk/cmd.c | 1 + trunk/tmux.1 | 62 +++++++++++++ trunk/tmux.h | 1 + 5 files changed, 285 insertions(+), 2 deletions(-) create mode 100644 trunk/cmd-choose-tree.c -- 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