clickhouse-cli icon indicating copy to clipboard operation
clickhouse-cli copied to clipboard

cli interface chars

Open zba opened this issue 5 years ago • 3 comments

now cli interface adds ' ] ' to begin of wrapped line, which cause problems when you try to copy, part of query, is it possible to make it like ordinary *nix command line, without additional chars ? image

zba avatar Nov 15 '19 10:11 zba

I haven't found a way for prompt_toolkit to behave like that :( both ipython and ptpython have the same issue, too. Perhaps, a custom keyboard shortcut to copy the current query to the clipboard could be a middle ground for this..

hatarist avatar Nov 22 '19 19:11 hatarist

Usually, i need to copy part of query. I not a pythonist, so not know, but I wonder if there is no just readline bindings for python (I used one very long time ago for perl) https://docs.python.org/3/library/readline.html

Looks like something like this

zba avatar Nov 23 '19 16:11 zba

the current prompt library, prompt_toolkit, behaves as a readline alternative (a pretty awesome one, until it comes to copying the input/output without the forced softwrapping):

related issues: https://github.com/prompt-toolkit/python-prompt-toolkit/issues/709 https://github.com/dbcli/pgcli/issues/432#issuecomment-402565690

could try implementing a custom hotkey to copy the selection to the clipboard - https://github.com/dbcli/pgcli/issues/432#issuecomment-403105775 - will try and check it later

hatarist avatar Nov 24 '19 09:11 hatarist