kelleyma49 / PSFzf

A PowerShell wrapper around the fuzzy finder fzf
MIT License
752 stars 35 forks source link

Invoke-FzfTabCompletion fails #176

Closed mateuszdrab closed 1 year ago

mateuszdrab commented 1 year ago

Hey there

Thanks for the module, I'm just trying it out but a number of functions don't work for me.

For example when calling Invoke-FzfTabCompletion I get:

Method invocation failed because [System.Management.Automation.PathInfo] does not contain a method named 'StartsWith'.
At ...Documents\WindowsPowerShell\Modules\PSFzf\2.4.9\PSFzf.psm1:1769 char:5                     
+     $addSpace = $null -ne $currentPath -and $currentPath.StartsWith(" ...                                                        
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                
+ CategoryInfo          : InvalidOperation: (:) [], RuntimeException                                                               
+ FullyQualifiedErrorId : MethodNotFound

This completely breaks tab completion so I can't use Set-PSReadLineKeyHandler -Key Tab -ScriptBlock { Invoke-FzfTabCompletion }.

Additionally, the aliases such as fg or fkill are not defined. Am I missing something?

I'm intializing PsFZF as follows Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r'

Module version: 2.4.9 PS: 5.1

Thanks