bling / fzf.el

A front-end for fzf
GNU General Public License v3.0
360 stars 50 forks source link

Regression in `fzf-with-command` #113

Closed mavant closed 1 year ago

mavant commented 1 year ago

At some point between package-version 20220726.2216 and package-version 20230224.1236 there was a regression causing fzf-with-command, to fail when selecting non-file inputs (e.g. (fzf-with-command "uuidgen" #'message) can only return the empty string). I suspect this was introduced by #92 . It seems somewhat more correct for the default value of fzf--target-validator to be fzf--pass-through rather than fzf--validate-filename.

pierre-rouleau commented 1 year ago

Thanks for reporting. I'm a little busy these days; i'll try to look at it this week-end.

pierre-rouleau commented 1 year ago

@mavant, you are correct: the regression has to do with the fzf--target-validator not being fzf--pass-through as required for fzf-with-command.
I will provide a fix for fzf-with-command now. A overall refactoring of the validation would be needed to simplify the code, but as I mentionned earlier, I'm a little busy these days with other things, so I'll just address the regression and later will try to simplify the complete file; that requires more testing and ideally the testing would be done automatically.

pierre-rouleau commented 1 year ago

@mavant, can you check and confirm that my PR fixes the issue?