[FROG] readline 8.1 and bracketed pasting in vtysh
Mark Kamichoff
prox at prolixium.com
Tue Feb 2 03:27:16 UTC 2021
tl;dr readline 8.1 turns on bracketed paste and appears to break
multi-line pasting in vtysh
Hi -
I noticed that on a few of my boxes I can no longer paste a set of
commands into vtysh using either FRR 6.x or 7.x. The result was that
the lines were treated as a single line and therefore rejected. For
example, if I want to create a simple route-map like so:
route-map foo permit 5
set as-path prepend 1 2 3 4
end
Here's what happened when I first pasted the 3x lines:
====snip====
excalibur(config)# route-map foo permit 5
set as-path prepend 1 2 3 4
end
====snip====
(the pasted text is highlighted in the terminal)
After hitting enter vtysh rejects the command because it sees it as a
single line (I think):
====snip====
% Unknown command: route-map foo permit 5
set as-path prepend 1 2 3 4
end
excalibur(config)#
====snip====
The expected result should look something like this (I manually typed it
in):
====snip====
excalibur(config)# route-map foo permit 5
excalibur(config-route-map)# set as-path prepend 1 2 3 4
excalibur(config-route-map)# end
excalibur#
====snip====
I dug a little deeper and it looks like this is a result of bracketed
paste[0] that has been enabled in the 8.1 release of GNU readline
released in Dec of 2020[1]. I confirmed that an older system I have
still running readline 8.0 does not have this issue. I think vtysh
rejects the command because of the escape characters that are used with
bracketed paste.
I couldn't find any option to disable bracketed paste in readline itself
or vtysh. Shells like Zsh and Bash have options for it in their config
files.
Does anyone know how to disable bracketed paste in vtysh? Or, is there
something else funky going on here?
I'm using rxvt-unicode on Linux/X11. I tested this with Terminal.app on
Big Sur as well and got the same result.
Thanks!
- Mark
[0] https://cirw.in/blog/bracketed-paste
[1] https://lwn.net/Articles/839213/ (see h. in the CHANGES list)
--
Mark Kamichoff
prox at prolixium.com
https://www.prolixium.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.frrouting.org/pipermail/frog/attachments/20210201/79756f83/attachment.sig>
More information about the frog
mailing list