[PATCH 4/4] Add choose-list to man page

2012-07-21 Thread Thomas Adam
--- trunk/tmux.1 | 27 +++ 1 file changed, 27 insertions(+) diff --git a/trunk/tmux.1 b/trunk/tmux.1 index 8e834dd..3c72dea 100644 --- a/trunk/tmux.1 +++ b/trunk/tmux.1 @@ -1071,6 +1071,33 @@ section. This command works only from inside .Nm . .It Xo +.Ic choose-list +

[PATCH 3/4] Build cmd-choose-list.c by adding to Makefile.am

2012-07-21 Thread Thomas Adam
--- trunk/Makefile.am |1 + 1 file changed, 1 insertion(+) diff --git a/trunk/Makefile.am b/trunk/Makefile.am index 890e157..054176f 100644 --- a/trunk/Makefile.am +++ b/trunk/Makefile.am @@ -66,6 +66,7 @@ dist_tmux_SOURCES = \ cmd-capture-pane.c \ cmd-choose-buffer.c \

[PATCH 2/4] Add cmd-choose-list.c

2012-07-21 Thread Thomas Adam
This defines the choose-list command. --- trunk/cmd-choose-list.c | 125 +++ trunk/cmd.c |1 + trunk/tmux.h|1 + 3 files changed, 127 insertions(+) create mode 100644 trunk/cmd-choose-list.c diff --git a/trunk/cmd-choos

[PATCH 0/4] Add choose-list command

2012-07-21 Thread Thomas Adam
Hi, This adds a choose-list command, allowing user menus to be created. Hopefully fairly self-explanatory. Any questions, please do ask. Kindly, -- Thomas Adam Thomas Adam (4): Introduce window_choose_add_item() Add cmd-choose-list.c Build cmd-choose-list.c by adding to Makefile.am Ad

[PATCH 1/4] Introduce window_choose_add_item()

2012-07-21 Thread Thomas Adam
Responsible for displaying list entries in choice mode. --- trunk/tmux.h |3 +++ trunk/window-choose.c | 33 + 2 files changed, 36 insertions(+) diff --git a/trunk/tmux.h b/trunk/tmux.h index 49f053f..0dedd14 100644 --- a/trunk/tmux.h +++ b/trunk/tmu

Re: [PATCH 4/6] Add pos item to denote position in choose data

2012-07-21 Thread Thomas Adam
On Sun, Jul 15, 2012 at 12:31:08PM +0100, Thomas Adam wrote: > So that entries as listed in choose-* mode commands can be selected with a > numeric prefix, ensure we know which prefix that is, by maintaining the > index of that item in the array. > --- > trunk/tmux.h |5 +++-- > trunk

[PATCH V2 0/7] Choose-mode: winlinks colours, numeric-key prefixes

2012-07-21 Thread Thomas Adam
Hi, V2 of this patch series gets rid of that stupid items->pos patch in V1, and instead uses #{line} to denote the line number. This therefore means users can override that with -F, rather than having it hard-coded for them. All other code is the same as in V1. Any questions, do please ask. Ki

[PATCH V2 4/7] Make choose entries use ever-increasing numeric ID

2012-07-21 Thread Thomas Adam
Make all entries in choose-mode use an ever-increasing numeric ID, and prompt for that ID, if a user presses a number. If the number of items are less than 10, automatically go to the item -- otherwise issue a "Goto item" prompt instead. --- trunk/window-choose.c | 142 ++

[PATCH V2 6/7] Fix-up templates in choose-tree W.R.T #{line}

2012-07-21 Thread Thomas Adam
--- trunk/cmd-choose-tree.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/trunk/cmd-choose-tree.c b/trunk/cmd-choose-tree.c index b33bf34..46d940d 100644 --- a/trunk/cmd-choose-tree.c +++ b/trunk/cmd-choose-tree.c @@ -149,7 +149,8 @@ cmd_choose_tree_exec(struct cmd *

[PATCH V2 1/7] Split out winlink colour settings

2012-07-21 Thread Thomas Adam
At the moment, the logic for setting the fg/bg/attr for winlinks happens only in status_print(). Split out the logic to winlink_set_alert_colours() so that it can be used elsewhere. --- trunk/status.c | 33 ++--- trunk/tmux.h |3 +++ trunk/window.c | 45 +

[PATCH V2 3/7] Define 0-9 and backspace as bindings in choice-mode

2012-07-21 Thread Thomas Adam
Make numeric keys and backspace have meaning in choice-mode so that they can be used later on in prompts, etc. --- trunk/mode-key.c | 24 trunk/tmux.h |2 ++ 2 files changed, 26 insertions(+) diff --git a/trunk/mode-key.c b/trunk/mode-key.c index b82e9b9..a5540f

[PATCH V2 7/7] Introduce window_mode_attrs()

2012-07-21 Thread Thomas Adam
Create a function for setting a given grid_cell to the mode-* values, and use it. --- trunk/tmux.h|1 + trunk/window-copy.c | 10 ++ trunk/window.c | 10 ++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/trunk/tmux.h b/trunk/tmux.h index ea4410

[PATCH V2 5/7] Use #{line} at the start of some default templates

2012-07-21 Thread Thomas Adam
Since key-combinations can mark entries, rather than making this different from the template, add the "line" marker to the template, and allow users to override that with -F in some commands to turn it off if wanted. --- trunk/tmux.h | 40 1 file changed,

[PATCH V2 2/7] Render winlink alerts in choose-mode

2012-07-21 Thread Thomas Adam
When rendering windows in choose-mode (via choose-tree and choose-window) render certain lines in their appropriate alert colour, if set. --- trunk/window-choose.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/trunk/window-choose.c b/trunk/window-choose.c index f385763..96d13f5 100644

Default window/session templates

2012-07-21 Thread Thomas Adam
Hi, Something on my own TODO list which I'm thinking has to happen sooner rather than later is to take a look at the default session/window templates. Now that we have the ability to customise a lot of these with -F, there's an imbalance between the amount of information we display by default, an

Re: [PATCH V2 6/7] Fix-up templates in choose-tree W.R.T #{line}

2012-07-21 Thread Thomas Adam
On Sat, Jul 21, 2012 at 07:15:29PM +0100, Thomas Adam wrote: > --- > trunk/cmd-choose-tree.c |6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/trunk/cmd-choose-tree.c b/trunk/cmd-choose-tree.c > index b33bf34..46d940d 100644 > --- a/trunk/cmd-choose-tree.c > +++ b/

realpath prevents nested check from working

2012-07-21 Thread Dylan Alex Simon
I noticed (accidentally) that the check to prevent nesting tmux in the same server wasn't working. I tracked this down to the fact that $TMUX is "/tmp//tmux-499/default,917,0" in my first session. Note the double-slash, because _PATH_TMP is "/tmp/". The first time tmux is run, before the socket