junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
61.81k stars 2.35k forks source link

Merge fish history before showing history widget #3851

Closed ismay closed 3 weeks ago

ismay commented 3 weeks ago

Checklist

Output of fzf --version

0.52.1

OS

Shell

Problem / Steps to reproduce

In this function: https://github.com/junegunn/fzf/blob/master/shell/key-bindings.fish#L59-L86 we're currently only showing the changes from the current session. If we call history merge beforehand commands from other sessions will be available as well.

Docs on history merge:

Immediately incorporates history changes from other sessions. Ordinarily fish ignores history changes from sessions started after the current one. This command applies those changes immediately.

from: https://fishshell.com/docs/current/cmds/history.html

We could do it similar to this widely used plugin: PatrickF1/fzf.fish, which also incorporates a check for private mode.

junegunn commented 3 weeks ago

Sounds good. Are you interested in opening a pull request?

ismay commented 3 weeks ago

Yeah sounds good. I should have time for it this week.

ismay commented 3 weeks ago

Actually it's not a lot of work, so I just created the PR now.