Hi,
* On Sat, Nov 17, 2012 at 06:38:38PM +0000, Thomas Adam <tho...@xteddy.org> wrote:
M +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> --- options-table.c | 7 +++++++ tmux.1 | 2 ++ window-choose.c | 13 ++++++------- 3 files changed, 15 insertions(+), 7 deletions(-) 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" + }, +This ability breaks how choice-mode then goes on to number other items once the choice-characters have been used up. Since the behaviour is to keep numbering the entries after the last one, if you do: set -g choice-characters "1 3 0 9 2" amd then look at, say, choose-tree, you'll find the sequence very strange indeed. Not to mention you cannot guarantee, even with the ordering here, that you'll never get duplicate entries, making the entire point of pressing a letter to go to a key-binding redundant.
Yes, with only 5 characters you can hit the duplicates very fast, however, with the default value you should hit it after 62 windows, so there is a limit anyways.
I currently use this set -g choice-characters 'qwerasdfzxcv123~[]\;/=-l,.hjkiopnm'
So, yes, it is necessary to set this higher to avoid duplicates.
Hmm... so I wonder now, whether this is worth it. The assignment of letters and numbers here, to denote the items which you can select with a key-binding is always deterministic, and if you go beyond the default, then you're prompted for selection anyway. Why is this patch useful to you, out of interest?
I like to use alphabets to choose windows (since I do so in other environments like pentadactyl -- using letters for hints), it is just out of habit - others may have their own preferences.
-- Thomas Adam
Regards, -- Raghavendra Prabhu GPG Id : 0xD72BE977 Fingerprint: B93F EBCB 8E05 7039 CD3C A4B8 A616 DCA1 D72B E977 www: wnohang.net
pgpiIPVYszacz.pgp
Description: PGP signature
------------------------------------------------------------------------------ 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