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

RFC: Add history_move_{next/prevoius} #133

Closed
wants to merge 1 commit into from

Conversation

azat
Copy link
Contributor

@azat azat commented Nov 19, 2021

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).

@AmokHuginnsson
Copy link
Owner

It is good idea regarding unconditional history move up/down actions availability to the user.
Regarding default key binding for CTRL-p/CTRL-n, there is already a pinned issue about exactly that.
I will investigate if using Meta-Up/Meta-Down is a viable option.

@azat
Copy link
Contributor Author

azat commented Nov 20, 2021

Regarding default key binding for CTRL-p/CTRL-n, there is already a pinned issue about exactly that.

#78

I will investigate if using Meta-Up/Meta-Down is a viable option.

Thanks.

You mean Meta-Up/Meta-Down for history_move_{next/previous}?
I can convert the patch to use Meta-Up/Meta-Down for new bindings for now (I can change default bindings anyway).

So you don't like to change C-p/C-n behavior in general?

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).
@azat
Copy link
Contributor Author

azat commented Nov 20, 2021

I can convert the patch to use Meta-Up/Meta-Down for new bindings for now (I can change default bindings anyway).

Done.

@AmokHuginnsson
Copy link
Owner

Hi.

I have amended you PR by changing action names.
I also added regression tests.
It is pushed to master now.

Thank you for this contribution!

@AmokHuginnsson
Copy link
Owner

I forgot to answer your question.
I am very hesitant to change default that were present in the library from the beginning.
Some users could be accustom to it already.
The original defaults did not come from readline but from tcsh shell I was using at the time...

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.

2 participants