Repository navigation
Make Replxx a modal line editor - #36
Merged
Merged
Conversation
Member
|
Removing the CLAssistant since @spinojara is covered under our corporate CLA with Axis Communications. |
Member
|
Could you add some tests for this? |
Author
|
How do I make tests in this repo? Documentation is lacking, but I assume tests.py? I cannot even build the project on the master branch. |
Member
|
@spinojara I don't have much experience with this repo, I'll see if I can get someone else to look at it. |
# Conflicts: # src/terminal.cxx
Member
|
@spinojara, could you please sign the CLA? (it's fully online, so it should be quick) |
Author
|
I have already signed a CCLA, see comment from George above. |
Member
|
The code LGTM, ready to merge. |
Member
|
@spinojara Thank you! Now waiting for a PR to the main repo - to toggle the new mode and see it in action. |
groeneai
added a commit
to groeneai/ClickHouse
that referenced
this pull request
Oct 15, 2026
ClickHouse/replxx#50 is merged into `master` of `replxx`, and the copy of the same fixes on top of the previous pointer (ClickHouse/replxx#51) is closed. Point the submodule to the merge commit. This also brings the `master` changes that were not in the previous pointer: editing modes, `Esc` delay, prompt indentation, per-terminal state and the Meta+Up fix (ClickHouse/replxx#36, ClickHouse#43, ClickHouse#44, ClickHouse#45, ClickHouse#46, ClickHouse#47, ClickHouse#48). `04909_client_hints_history_navigation`, which the `Esc` delay broke before ClickHouse#48, passes 10/10 locally. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make Replxx a modal line editor. This is completely backward-compatible since the default editing mode is always 0 if it is not explicitly set. I will later contribute a vi/vim mode to the ClickHouse cli (see https://github.com/spinojara/ClickHouse/tree/vim for a partial implementation). This would make it possible to emulate vi/vim mode inside the ClickHouse cli (e.g. as 'set -o vi' does in bash).
For this we need to be able to parse the escape key as a separate key. This is done through the escDelay variable. By default escDelay is set to 0 which makes Replxx act as before. The changes in src/escape.cxx are many, but are only there to pass the escDelay variable, nothing else.
This patch also adds several new actions which help with emulated vi/vim mode.
Warning: The small windows specific snippet is not actually tested since I do not have access to a windows machine. That is around line 469 in src/terminal.cxx.