PSFzf icon indicating copy to clipboard operation
PSFzf copied to clipboard

Does this wrapper support fuzzy selecting object, rather then just string?

Open onriv opened this issue 5 years ago • 2 comments

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?

onriv avatar Nov 14 '19 11:11 onriv

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.

kelleyma49 avatar Nov 14 '19 16:11 kelleyma49

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

mattcargile avatar Mar 18 '22 04:03 mattcargile