aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2020-10-13 20:19:19 +0200
committerPřemysl Eric Janouch <p@janouch.name>2020-10-13 20:19:19 +0200
commitfcf65f837795f8251aa9bb6249065464141e7cdd (patch)
tree52af7a99e037b6cd069bd1fe35d7b113b67c3158
parentd820bc2f23eb736575554e20621b4df80e7b1dc6 (diff)
downloadjson-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.c4
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);