usql icon indicating copy to clipboard operation
usql copied to clipboard

\echo and \warn -n problem on interactive

Open kenshaw opened this issue 3 years ago • 1 comments

\echo and \warn when using the -n option works, but the rline library seems to be clearing the line:

$ usql
Type "help" for help.

(not connected)=> \echo -n foo
(not connected)=>

vs psql:

$ psql postgres://postgres:P4ssw0rd@localhost
psql (13.2 (Ubuntu 13.2-1.pgdg20.10+1), server 13.1 (Debian 13.1-1.pgdg100+1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.

postgres=# \echo -n foo
foopostgres=# 

kenshaw avatar Apr 04 '21 01:04 kenshaw

It's worth noting, however, that it is indeed working, as demonstrated when using the -c command-line option:

$ usql -c '\echo -n foo'
fooken@ken-desktop:~/src/go/src/github.com/xo/usql$

kenshaw avatar Apr 04 '21 01:04 kenshaw