chrisant996 / clink-fzf

Fzf integration for Clink
MIT License
77 stars 10 forks source link

[fzf_history] Remove leading command number #16

Closed jrmolin closed 6 months ago

jrmolin commented 6 months ago

When I was using the Ctrl-R to sift through my history, this script was outputting the command-history number, as well as the command. I then had to edit the line before hitting enter. Obviously, I didn't want to keep doing that. I made the change locally, but thought maybe you'd like it, too? I'm not sure if there's just a configuration setting that would accomplish this.

chrisant996 commented 6 months ago

Oh OOPS that was a regression caused by adding support for DEL to delete the selected history entry. In order for DEL to work, the history number has to be present (fzf has no way to provide a one-based index instead of a zero-based index, and history numbers are one-based). I totally missed making sure it didn't get inserted into the command line.

Your change is probably sufficient, but I'll take a closer look to make sure I didn't miss anything else relevant as well...

jrmolin commented 6 months ago

Thanks for this! Also, thanks for clink--it has made my dev experience so much more pleasant!!