summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-02-10 11:01:18 +0200
committerGitHub <noreply@github.com>2021-02-10 11:01:18 +0200
commitde6223a98d7cd3a38a19f0c97a8692d6ea5e17bc (patch)
tree5ddfebd655420daff7f1288e91d1e3d37a5d75cb
parent3d26211e082c15612b36dac612318db3b5c4686d (diff)
parentdab6893f15cdb597d43ec86906657b88dbf8da16 (diff)
Merge pull request #8033 from qlyoung/fix-gnu-readline-bracketed-paste
vtysh: disable bracketed paste in readline
-rw-r--r--vtysh/vtysh.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index efb6b28acc..e026a28628 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -4001,10 +4001,16 @@ static char *vtysh_completion_entry_function(const char *ignore,
void vtysh_readline_init(void)
{
/* readline related settings. */
+ char *disable_bracketed_paste =
+ XSTRDUP(MTYPE_TMP, "set enable-bracketed-paste off");
+
rl_initialize();
+ rl_parse_and_bind(disable_bracketed_paste);
rl_bind_key('?', (rl_command_func_t *)vtysh_rl_describe);
rl_completion_entry_function = vtysh_completion_entry_function;
rl_attempted_completion_function = new_completion;
+
+ XFREE(MTYPE_TMP, disable_bracketed_paste);
}
char *vtysh_prompt(void)