Improve command prompt completion:

- Show a menu with completions if there are multiple.

- Don't complete argument stuff (options, layouts) at start of text.

- For -t and -s, if there is no : then complete sessions but if there is
  a :, show a menu of all windows in the session rather than trying to
  complete the window name which is a bit useless if there are
  duplicates.
This commit is contained in:
nicm
2020-05-16 15:06:03 +00:00
parent f03b61131b
commit 80e52545a0
4 changed files with 373 additions and 180 deletions

1
tmux.h
View File

@ -2796,6 +2796,7 @@ __dead void printflike(1, 2) fatalx(const char *, ...);
/* menu.c */
#define MENU_NOMOUSE 0x1
#define MENU_TAB 0x2
struct menu *menu_create(const char *);
void menu_add_items(struct menu *, const struct menu_item *,
struct cmdq_item *, struct client *,