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

Use Arrow-Up to search history with prefix #423

Open
oberien opened this issue Aug 2, 2020 · 1 comment · May be fixed by #424
Open

Use Arrow-Up to search history with prefix #423

oberien opened this issue Aug 2, 2020 · 1 comment · May be fixed by #424

Comments

@oberien
Copy link

oberien commented Aug 2, 2020

If I type something, and then press the arrow up key, I'd like that to search through the history, finding the next command that starts with the same prefix as there is before the cursor. For example if I type the following:

> cd /a/really/long/path
> ls
> cd /another/really/long/path
> ls
> cd /a/ ⬆

I'd like to get the first command autocompleted. Another example:

> cd abcdef
> ls
> cd ab123
> ls
> cd abc ⬅ ⬆

In that example, my cursor will be after cd ab before the last c. When pressing up, I'd now like to have suggested cd ab123 and after another arrow-up-press I'd like to be suggested cd abcdef.

Is something like this already being worked on? Otherwise I'll try to implement it.

Reference: nushell/nushell#465

@gwenn
Copy link
Collaborator

gwenn commented Aug 2, 2020

oberien added a commit to oberien/rustyline that referenced this issue Aug 2, 2020
Allow history search via Arrow-Up/Down or C-p/n to go either line-by-line or based on the prefix before the cursor position

Fix kkawakam#423
@oberien oberien linked a pull request Aug 2, 2020 that will close this issue
oberien added a commit to oberien/rustyline that referenced this issue Oct 31, 2020
Allow history search via Arrow-Up/Down or C-p/n to go either line-by-line or based on the prefix before the cursor position

Fix kkawakam#423
oberien added a commit to oberien/rustyline that referenced this issue Apr 17, 2021
Allow history search via Arrow-Up/Down or C-p/n to go either line-by-line or based on the prefix before the cursor position

Fix kkawakam#423
oberien added a commit to oberien/rustyline that referenced this issue Apr 17, 2021
Allow history search via Arrow-Up/Down or C-p/n to go either line-by-line or based on the prefix before the cursor position

Fix kkawakam#423
oberien added a commit to oberien/rustyline that referenced this issue Apr 17, 2021
Allow history search via Arrow-Up/Down or C-p/n to go either line-by-line or based on the prefix before the cursor position

Fix kkawakam#423
oberien added a commit to oberien/rustyline that referenced this issue May 15, 2021
Allow history search via Arrow-Up/Down or C-p/n to go either line-by-line or based on the prefix before the cursor position

Fix kkawakam#423
oberien added a commit to oberien/rustyline that referenced this issue Jun 4, 2021
Allow history search via Arrow-Up/Down or C-p/n to go either line-by-line or based on the prefix before the cursor position

Fix kkawakam#423
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 a pull request may close this issue.

2 participants