Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always re-render prompt while navigating history #135

Conversation

alexey-milovidov
Copy link
Contributor

See #130

PS.

milovidov@milovidov-desktop:~/work/ClickHouse/contrib/replxx$ git checkout master
Switched to branch 'master'
Your branch and 'origin/master' have diverged,
and have 13 and 107 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)
milovidov@milovidov-desktop:~/work/ClickHouse/contrib/replxx$ git fetch
From https://github.com/ClickHouse-Extras/replxx
 + 68410ac...f97765d master     -> origin/master  (forced update)
milovidov@milovidov-desktop:~/work/ClickHouse/contrib/replxx$ git reset --hard origin/master
HEAD is now at f97765d Merge pull request #17 from azat-archive/replxx-incremental_history_search-fix-upstream
milovidov@milovidov-desktop:~/work/ClickHouse/contrib/replxx$ git checkout master-old 
Switched to branch 'master-old'
milovidov@milovidov-desktop:~/work/ClickHouse/contrib/replxx$ git reset --hard origin/master
HEAD is now at f97765d Merge pull request #17 from azat-archive/replxx-incremental_history_search-fix-upstream
milovidov@milovidov-desktop:~/work/ClickHouse/contrib/replxx$ git push origin-ssh
Total 0 (delta 0), reused 0 (delta 0)
remote: 
remote: Create a pull request for 'master-old' on GitHub by visiting:
remote:      https://github.com/ClickHouse-Extras/replxx/pull/new/master-old
remote: 
To github.com:ClickHouse-Extras/replxx.git
 * [new branch]      master-old -> master-old
milovidov@milovidov-desktop:~/work/ClickHouse/contrib/replxx$ git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
milovidov@milovidov-desktop:~/work/ClickHouse/contrib/replxx$ git fetch git@github.com:AmokHuginnsson/replxx.git master
From github.com:AmokHuginnsson/replxx
 * branch            master     -> FETCH_HEAD
milovidov@milovidov-desktop:~/work/ClickHouse/contrib/replxx$ git reset --hard FETCH_HEAD
HEAD is now at 68410ac Add history_move_{next/prevoius}
milovidov@milovidov-desktop:~/work/ClickHouse/contrib/replxx$ git push --force origin-ssh
Total 0 (delta 0), reused 0 (delta 0)
To github.com:ClickHouse-Extras/replxx.git
 + f97765d...68410ac master -> master (forced update)
milovidov@milovidov-desktop:~/work/ClickHouse/contrib/replxx$ git checkout -b amosbird-rerenderprompt
Switched to a new branch 'amosbird-rerenderprompt'
milovidov@milovidov-desktop:~/work/ClickHouse/contrib/replxx$ git pull git@github.com:amosbird/replxx.git rerenderprompt
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 5 (delta 4), reused 5 (delta 4), pack-reused 0
Unpacking objects: 100% (5/5), 1009 bytes | 252.00 KiB/s, done.
From github.com:amosbird/replxx
 * branch            rerenderprompt -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
Applying: Add history_move_{next/prevoius}
milovidov@milovidov-desktop:~/work/ClickHouse/contrib/replxx$ git push origin-ssh
Enumerating objects: 26, done.
Counting objects: 100% (26/26), done.
Delta compression using up to 32 threads
Compressing objects: 100% (11/11), done.
Writing objects: 100% (16/16), 2.77 KiB | 2.77 MiB/s, done.
Total 16 (delta 13), reused 6 (delta 5)
remote: Resolving deltas: 100% (13/13), completed with 9 local objects.
remote: 
remote: Create a pull request for 'amosbird-rerenderprompt' on GitHub by visiting:
remote:      https://github.com/ClickHouse-Extras/replxx/pull/new/amosbird-rerenderprompt
remote: 
To github.com:ClickHouse-Extras/replxx.git
 * [new branch]      amosbird-rerenderprompt -> amosbird-rerenderprompt

amosbird and others added 2 commits November 20, 2021 21:11
Right now there is UP/DOWN arrows, that is binded to
history_prevous/history_next accordingly.

But in case of multiline history entry it will navigate through the
lines in the current history itemfirst, and this may not be the requird
behavior.

So now replxx will have history_move_*, that will always navigate
through history, regardless of new lines in query.

New history_move_{next/prev} binded to M-UP/M-DOWN (like in readline).
@alexey-milovidov
Copy link
Contributor Author

Sorry, wrong repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants