PSFzf
PSFzf copied to clipboard
Does this wrapper support fuzzy selecting object, rather then just string?
There are cases, for example:
ls|%{$_.Name}|fzf|%{ls -Filter $_}
rather than select the string and search with the target object with it, does this wrapper support fuzzily selecting object?
Good question. PsFzf doesn't currently support this. I've been thinking of how to do this, and there isn't a straightforward way to support this.
As PSFzf is a wrapper around fzf. Fzf only deals with strings. The id of the object would have to be passed into fzf so it could be passed out in the results. PSFzf would have to store the objects until fzf returns so it can match the object to the value returned by fzf.
I haven't read through it all. I think the below code might be helpful here. I want to explore it some time.
https://github.com/ninmonkey/Ninmonkey.Console/blob/5b89dea91a8cff988a807f7799d261884cf19b46/public/Select-NinProperty.ps1