diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2020-10-13 20:19:19 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2020-10-13 20:19:19 +0200 |
commit | fcf65f837795f8251aa9bb6249065464141e7cdd (patch) | |
tree | 52af7a99e037b6cd069bd1fe35d7b113b67c3158 | |
parent | d820bc2f23eb736575554e20621b4df80e7b1dc6 (diff) | |
download | json-rpc-shell-fcf65f837795f8251aa9bb6249065464141e7cdd.tar.gz json-rpc-shell-fcf65f837795f8251aa9bb6249065464141e7cdd.tar.xz json-rpc-shell-fcf65f837795f8251aa9bb6249065464141e7cdd.zip |
Add libedit autocompletion back in
I've mistakenly removed it in the M-Enter change.
-rw-r--r-- | json-rpc-shell.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/json-rpc-shell.c b/json-rpc-shell.c index 82ad5ea..2ddb95c 100644 --- a/json-rpc-shell.c +++ b/json-rpc-shell.c @@ -689,6 +689,10 @@ input_el_start (struct input *input, const char *program_name) el_set (self->editline, EL_BIND, "M-e", "run-editor", NULL); el_set (self->editline, EL_ADDFN, + "complete", "Complete word", input_el_on_complete); + el_set (self->editline, EL_BIND, "\t", "complete", NULL); + + el_set (self->editline, EL_ADDFN, "newline-insert", "Insert a newline", input_el_on_newline_insert); el_set (self->editline, EL_BIND, "M-\n", "newline-insert", NULL); |