[Varnish] #1531: editline does not clean command line

Varnish varnish-bugs at varnish-cache.org
Mon Jun 23 12:49:45 CEST 2014

#1531: editline does not clean command line
 Reporter:  lkarsten    |      Owner:
     Type:  defect      |     Status:  new
 Priority:  normal      |  Milestone:
Component:  varnishadm  |    Version:  trunk
 Severity:  normal      |   Keywords:
 When using varnishadm to send commands to varnishd, varnishadm doesn't
 clean the prompt after a command. The previous command is still visible in
 the terminal after the prompt returns.

 Expected result: varnishadm would restore the prompt to a clean state
 (=="varnish > ") after each command that is run.

 lkarsten at sierra:~$ varnishadm
 Varnish Cache CLI 1.0
 varnish-4.0.1-rc1 revision 0e9bd49

 Type 'help' for command list.
 Type 'quit' to close CLI session.

 varnish> help
 help [command]
 ping [timestamp]
 [.. cut ..]
 backend.set_health matcher state
 ban <field> <operator> <arg> [&& <field> <oper> <arg>]...

 varnish> helpbackend.list
 varnish> backend.list
 Backend name                   Refs   Admin      Probe
 default(,,8085)       1      probe      Healthy 4/4
 varnish> backend.listquit
 varnish> quit
 Closing CLI connection

 The internal buffer is emptied, because pressing enter again makes
 varnishadm return as no command was given.

 TERM is xterm-color, ssh from urxvt to a ubuntu 14.04/trusty server.

 lkarsten at sierra:~$ ldd /opt/varnish/bin/varnishadm
         linux-vdso.so.1 =>  (0x00007fffd898c000)
         libvarnishapi.so.1 => /opt/varnish/lib/libvarnishapi.so.1
         libedit.so.2 => /usr/lib/x86_64-linux-gnu/libedit.so.2
         libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb015250000)
         libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
         libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb014c6c000)
         libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3
         librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1
         libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5
         /lib64/ld-linux-x86-64.so.2 (0x00007fb0159cc000)
 lkarsten at sierra:~$
 lkarsten at sierra:~$ dpkg -l | grep libedit
 ii  libedit-dev:amd64                      3.1-20130712-2
 amd64        BSD editline and history libraries (development files)
 ii  libedit2:amd64                         3.1-20130712-2
 amd64        BSD editline and history libraries

Ticket URL: <https://www.varnish-cache.org/trac/ticket/1531>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

More information about the varnish-bugs mailing list