chrisant996 / clink-fzf

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

question: Is there a way to delete history with fzf history? #11

Closed fcying closed 6 months ago

fcying commented 6 months ago

I used to use [["\e[1;7A"]] to view history, and it could press 'del' to delete item. but del doesn't work when use fzf history.

chrisant996 commented 6 months ago

The fzf program controls everything that happens while using fzf, and it doesn't have a way to do that. Read the documentation on fzf for more info on what fzf can and can't do.

chrisant996 commented 6 months ago

It looks like there might be a way to do a bunch of customized configuration of fzf and get deletion of history to work.

Also, I don't actually use fzf. So I would encourage you (or others) to read up on how to configure fzf, and try to get it customized to do what you want. Sharing the results here could be helpful to others as well.

chrisant996 commented 6 months ago

Turns out it was very simple. There are some issues in the fzf repo about it, but it isn't hooked up in fzf by default because it's highly shell-specific, and fzf knows nothing about shells. But clink-fzf is specific to Clink, so it can configure it by default.

Pull the latest version and enjoy.