aerc/commands
Sergey Smirnykh 12e8217d1f commands: implement prompt completion
This patch implements :prompt completion.
The completion mechanism only provides completions when there is at least
one argument specified (prompt text).
The mechanism is based on other commands' completions and works as follows:

   1. Attempts to look up a command by the name specified in args[1].

   2.a On success it uses command.Complete.

   2.b Otherwise, if total arguments count is lesser or equals than 2
       (i.e. no command arguments specified), it attempts to complete
       the command's name.

Additional effort is made to preserve prompt text, which often contains
spaces and formatting.

Signed-off-by: Sergey Smirnykh <sergey.smirnykh@siborgium.xyz>
Acked-by: Robin Jarry <robin@jarry.cc>
2022-07-02 18:36:40 +02:00
..
account refactor: refactor pgp implementation 2022-04-27 09:46:11 +02:00
compose compose: refactor attachment handling 2022-07-02 17:52:49 +02:00
msg forward: remove crlf in text body 2022-07-02 17:53:11 +02:00
msgview open: fix mimetype discovery for encrypted or signed messages 2022-06-26 12:07:44 +02:00
terminal go.mod: change base git url 2021-11-05 10:21:45 +01:00
cd.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
choose.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
commands.go commands: implement prompt completion 2022-07-02 18:36:40 +02:00
ct.go commands: use SelectedAccountUiConfig instead of explicit nil check 2022-03-16 17:02:36 +01:00
exec.go logging: added a log on panic 2022-03-23 20:56:09 +01:00
global.go Implement basic tab completion support 2019-06-29 14:24:19 -04:00
help.go help: add completions 2022-05-23 20:59:10 +02:00
history.go Add command history and cycling 2019-07-26 14:29:34 -04:00
move-tab.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
new-account.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
next-tab.go statusline: implement per-account status 2022-03-18 23:42:07 +01:00
pin-tab.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
prompt.go commands: implement prompt completion 2022-07-02 18:36:40 +02:00
pwd.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
quit.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
set.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
term.go go.mod: change base git url 2021-11-05 10:21:45 +01:00
util.go logging: added a log on panic 2022-03-23 20:56:09 +01:00