summaryrefslogtreecommitdiffstats
path: root/vtysh/vtysh.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2016-11-19 10:42:52 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2016-11-23 08:32:30 +0100
commita7c36d8552cc71538bc42087531866cc16851a39 (patch)
tree220d460c5774f06ff70348de941e1c1eef2f7fa3 /vtysh/vtysh.c
parentbuild: remove memtypes.h, put back in .gitignore (diff)
downloadfrr-a7c36d8552cc71538bc42087531866cc16851a39.tar.xz
frr-a7c36d8552cc71538bc42087531866cc16851a39.zip
vtysh: initialise readline before binding key
when libreadline initialises itself, it also reads .inputrc, which may result in keybindings being set up. This means the builtin help on the '?' key can be overridden by that. Consistent availability of '?' behaviour trumps .inputrc setup here, so let's initialise readline first before binding that key (which means our keybinding wins). Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'vtysh/vtysh.c')
-rw-r--r--vtysh/vtysh.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 177f2a5b2..6a14aab63 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -2994,6 +2994,7 @@ void
vtysh_readline_init (void)
{
/* readline related settings. */
+ rl_initialize ();
rl_bind_key ('?', (rl_command_func_t *) vtysh_rl_describe);
rl_completion_entry_function = vtysh_completion_entry_function;
rl_attempted_completion_function = (rl_completion_func_t *)new_completion;