]> git.ipfire.org Git - thirdparty/bird.git/commit
birdc: Do not execute cmd on noninteractive help request
authorInrin <inrin@caesia.net>
Tue, 6 Feb 2024 18:03:14 +0000 (19:03 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 6 Feb 2024 18:03:14 +0000 (19:03 +0100)
commit0b52f7c01f55707b25eebd0a66c48eafe06fe455
tree2d69a666eac6068c7630c69972070e63f381addd
parentff2ebdc7e1c586762b04004608fb7aaf55e245c7
birdc: Do not execute cmd on noninteractive help request

The help command triggered by '?' keeps the message in readline buffer,
so it could be edited. For noninteractive shell it leads to an unexpected
side effect that `echo <cmd> ? | birdc` executes the command <cmd> after
showing its help. Avoid this by clearing the readline buffer in such case.
client/birdc.c