choose-tree, by default, folds/collapses the window tree grouped by session.
This adds a flag 'u' to uncollapse it by default.

Signed-off-by: Raghavendra D Prabhu <rpra...@wnohang.net>

diff --git a/cmd-choose-tree.c b/cmd-choose-tree.c
index e8da7a4..65d88a8 100644
--- a/cmd-choose-tree.c
+++ b/cmd-choose-tree.c
@@ -39,8 +39,8 @@ void  cmd_choose_tree_free(struct window_choose_data *);
 
 const struct cmd_entry cmd_choose_tree_entry = {
        "choose-tree", NULL,
-       "S:W:swb:c:t:", 0, 1,
-       "[-sw] [-b session-template] [-c window template] [-S format] " \
+       "S:W:swub:c:t:", 0, 1,
+       "[-swu] [-b session-template] [-c window template] [-S format] " \
        "[-W format] " CMD_TARGET_WINDOW_USAGE,
        0,
        NULL,
@@ -232,6 +232,10 @@ windows_only:
        window_choose_ready(wl->window->active, cur_win,
                cmd_choose_tree_callback, cmd_choose_tree_free);
 
+       if (args_has(args, 'u')) {
+               window_choose_expand_all(wl->window->active);
+       }
+
        return (CMD_RETURN_NORMAL);
 }
 
diff --git a/tmux.1 b/tmux.1
index 2a91658..bd1e334 100644
--- a/tmux.1
+++ b/tmux.1
@@ -1124,6 +1124,7 @@ This command works only from inside
 .Ic choose-tree
 .Op Fl s
 .Op Fl w
+.Op Fl u
 .Op Fl b Ar session-template
 .Op Fl c Ar window-template
 .Op Fl S Ar format
@@ -1149,6 +1150,9 @@ If
 .Fl w
 is given, will show windows.
 If
+.Fl u
+is given, the tree is uncollapsed by default.
+If
 .Fl b
 is given, will override the default session command.
 Note that
-- 
1.8.0.2


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to