fzf.fish icon indicating copy to clipboard operation
fzf.fish copied to clipboard

multi select for history (ctrl+r) puts timestamps in front of all but the first command

Open acegallagher opened this issue 1 year ago • 2 comments

Before proceeding...

Describe the bug

ctrl+r and then tab to select multiple entries puts the timestamp in front of the entries, like:

selecting commands after selected

I imagine this is repeatable behavior for the package, but I'm happy to help debug of course if it's somehow only my setup. I'm also looking at the code now and trying to see if I could submit a pull request.

Environment

Versions installed: bat 0.21.0 (405e5f74) fd 8.4.0 fzf 0.31.0 (a0ef898) fish, version 3.4.1

  • terminal: konsole
  • OS: Linux 5.18.14

Thanks much for putting together something so well thought out.

acegallagher avatar Aug 03 '22 22:08 acegallagher

Ah yeah, I have a pull request, just needed to change a few lines. Here is the code snippet:

set -U commands_selected # empty list to loop over selected commands, in case multiple
for c in (string split \n $command_with_ts)
    set --append commands_selected (string split --max 1 " │ " $c)[2]
end
commandline --replace -- $commands_selected

Incoming!

acegallagher avatar Aug 03 '22 23:08 acegallagher

Hi @acegallagher, the search history feature does not multi-select by default, so you must've configured it to be multi-selectable. What's your use case for selecting multiple commands?

PatrickF1 avatar Aug 03 '22 23:08 PatrickF1