Skip to content

Implement smarter history navigation#2161

Merged
joelim-work merged 8 commits into
gokcehan:masterfrom
joelim-work:history2
Sep 19, 2025
Merged

Implement smarter history navigation#2161
joelim-work merged 8 commits into
gokcehan:masterfrom
joelim-work:history2

Conversation

@joelim-work

@joelim-work joelim-work commented Sep 18, 2025

Copy link
Copy Markdown
Collaborator

Changes:

  • Change history file to not have a space between the prefix and command (i.e. :quit instead of : quit)
    • Use sed -i -E 's/^(.) /\1/' ~/.local/share/lf/history to make the existing history file compatible with the new behavior
  • Only select matching commands when navigating history
    • Type :foo<c-p> to scroll through only commands starting with :foo
  • Skip duplicates when navigating history
  • Some refactoring of the existing code

@CatsDeservePets CatsDeservePets left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
We just have to make sure to correctly merge it with #2146.

@joelim-work joelim-work merged commit 89ff7b0 into gokcehan:master Sep 19, 2025
4 checks passed
@joelim-work joelim-work deleted the history2 branch September 19, 2025 09:44
@joelim-work joelim-work added the breaking Pull requests that introduce breaking changes label Sep 19, 2025
@joelim-work joelim-work added this to the r39 milestone Sep 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Pull requests that introduce breaking changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ignore/skip duplicates in command history smarter command history navigation

2 participants