Hi I'm honestly not sold on the need for this. What's wrong with the default order?
On Sat, Dec 15, 2012 at 05:32:18AM +0530, Raghavendra D Prabhu wrote: > The characters used in choice-mode are hardcoded. This option allows one to > use > custom characters (and order) based on one's preference. Also, added > description > to the man page. > > Signed-off-by: Raghavendra D Prabhu <rpra...@wnohang.net> > > diff --git a/options-table.c b/options-table.c > index 8ce838a..c2ef30c 100644 > --- a/options-table.c > +++ b/options-table.c > @@ -108,6 +108,13 @@ const struct options_table_entry session_options_table[] > = { > .default_num = 0 > }, > > + { .name = "choice-characters", > + .type = OPTIONS_TABLE_STRING, > + .default_str = "0123456789" > + "abcdefghijklmnopqrstuvwxyz" > + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" > + }, > + > { .name = "default-command", > .type = OPTIONS_TABLE_STRING, > .default_str = "" > diff --git a/tmux.1 b/tmux.1 > index 20a61af..2a91658 100644 > --- a/tmux.1 > +++ b/tmux.1 > @@ -2050,6 +2050,8 @@ window of that session, > means all bells are ignored and > .Ic current > means only bells in windows other than the current window are ignored. > +.It Ic choice-characters Ar string > +String of characters which will be used for selecting in choice-mode. > .It Xo Ic bell-on-alert > .Op Ic on | off > .Xc > diff --git a/window-choose.c b/window-choose.c > index 5bcca17..3368c66 100644 > --- a/window-choose.c > +++ b/window-choose.c > @@ -702,10 +702,9 @@ window_choose_write_line( > int > window_choose_key_index(struct window_choose_mode_data *data, u_int idx) > { > - static const char keys[] = "0123456789" > - "abcdefghijklmnopqrstuvwxyz" > - "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; > - const char *ptr; > + struct options *oo = &global_s_options; > + char *keys = options_get_string(oo, > "choice-characters"); > + const char *ptr; > int mkey; > > for (ptr = keys; *ptr != '\0'; ptr++) { > @@ -721,9 +720,9 @@ window_choose_key_index(struct window_choose_mode_data > *data, u_int idx) > int > window_choose_index_key(struct window_choose_mode_data *data, int key) > { > - static const char keys[] = "0123456789" > - "abcdefghijklmnopqrstuvwxyz" > - "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; > + struct options *oo = &global_s_options; > + char *keys = options_get_string(oo, > "choice-characters"); > + > const char *ptr; > int mkey; > u_int idx = 0; > -- > 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 ------------------------------------------------------------------------------ Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of step-by-step video tutorials by Java experts. SALE $49.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122612 _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users