repeat command by arrow keys

77 views
Skip to first unread message

James Wang

unread,
Jul 12, 2017, 7:35:53 AM7/12/17
to ClickHouse
Hi All,

In MySQL I can repeat commands by UP/DOWN arrow key.

Can I do the same in the clickhouse client please?

Thanks a lot in advance
James

Yegor Andreenko

unread,
Jul 12, 2017, 6:56:37 PM7/12/17
to ClickHouse
Have you tried? Works for me.

James Wang

unread,
Jul 13, 2017, 4:33:40 AM7/13/17
to ClickHouse
Yes, many times:

$ clickhouse-client
ClickHouse client version 1.1.54248.
Connecting to localhost:9000.
Connected to ClickHouse server version 1.1.54248.

:) ^[[A


Do you need to have a special setting for it to work please?

Thanks

James Wang

unread,
Jul 13, 2017, 8:51:46 AM7/13/17
to ClickHouse
help please

any one?


James Wang

unread,
Jul 17, 2017, 3:51:16 AM7/17/17
to ClickHouse
Please help.

Alex Zatelepin

unread,
Jul 17, 2017, 2:20:50 PM7/17/17
to ClickHouse
Hi James! Do you use provided ClickHouse packages or did you compile it yourself? ClickHouse can use either libreadline or libedit for a line editing library, but history only works if it is compiled with libreadline.

On Monday, July 17, 2017 at 10:51:16 AM UTC+3, James Wang wrote:
Please help.

James Wang

unread,
Jul 17, 2017, 5:48:29 PM7/17/17
to ClickHouse
Yes, I build it from source on Centos 6

How do I compile it with libreadline please? 

Shall rebuild it.

Thanks a lot

Alex Zatelepin

unread,
Jul 18, 2017, 7:48:23 AM7/18/17
to ClickHouse
You should install readline-devel package and re-run cmake. If all is OK, the following line will appear:
-- Using line editing libraries (readline): /usr/include : /usr/lib64/libreadline.so;/usr/lib64/libtermcap.so

Instead of

-- Not using any library for line editing.

Alternatively on RedHat-based distros you can use packages provided by Altinity (https://packagecloud.io/altinity/clickhouse) although they are a bit out of date now.

James Wang

unread,
Jul 21, 2017, 8:16:21 AM7/21/17
to ClickHouse
Thanks a lot.
Reply all
Reply to author
Forward
0 new messages