Render tabs as 4 spaces when pasting into clickhouse-client#100416
Render tabs as 4 spaces when pasting into clickhouse-client#100416Algunenano merged 3 commits intoClickHouse:masterfrom
Conversation
|
Workflow [PR], commit [4654f7f] Summary: ❌
AI ReviewSummaryThis PR updates ClickHouse Rules
Final Verdict
|
azat
left a comment
There was a problem hiding this comment.
I like the idea, but, there is one problem with it, if I will paste a query, the copy it back, I will have spaces not tabs
And the problem is only with copying what replxx renders I guess, but not with formatted query that is printed by ClickHouse AFAU
What do you think about this?
| @@ -0,0 +1,2 @@ | |||
| -- https://github.com/ClickHouse/ClickHouse/pull/84605 | |||
| SELECT position('a a', '\t') > 0; | |||
There was a problem hiding this comment.
Why this has been broken in #84412?
It should not use replxx at all AFAIU
There was a problem hiding this comment.
Because it modified the query itself while pasting it, so ClickHouse got the modified query replacing any tab char with a space.
There was a problem hiding this comment.
It is still not clear, why non-interactive mode uses replxx.
There was a problem hiding this comment.
Yes, in CI with clickhouse-client --queries this will not fail. I just took the failed query from the revert to add it as part of the PR just in case
I'll see if I can improve it, but the current status is much worse since replxx gives you a broken query: |
I see, then I guess we are good |
|
I can force replxx to emit a tab character but it has 2 drawbacks:
I'll merge this as is. I don't think it's worth the headache |
33ac0a0
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Render tabs as 4 spaces when pasting into clickhouse-client. Closes #100405
Needs ClickHouse/replxx#37 merged first and then updating submodule
Documentation entry for user-facing changes