Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS tab expansion failing #290

Open
jektvik opened this issue Jan 24, 2025 · 0 comments
Open

PS tab expansion failing #290

jektvik opened this issue Jan 24, 2025 · 0 comments

Comments

@jektvik
Copy link

jektvik commented Jan 24, 2025

I'm getting the below crash when trying to work with the FzfTabCompletion in Powershell.

Am not a cmdline expert to understand the issue any better than just to paste you the error unfortunately.

An exception occurred in custom key handler, see $error for more information: Cannot bind argument to parameter 'Path' because it is an empty string.
PS C:\Users\JanusJektvik> $error
Test-Path : Cannot bind argument to parameter 'Path' because it is an empty string.
At C:\Program Files\WindowsPowerShell\Modules\PSFzf\2.6.7\PSFzf.psm1:2307 char:23
+         if (Test-Path "$resultTrimmed"  -PathType Container) {
+                       ~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Test-Path], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.Test
   PathCommand

My Powershell profile is:

Import-Module PSReadLine
Import-Module PSFzf

Set-PsFzfOption -TabExpansion -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r' 


Set-PSReadLineKeyHandler -Key Tab -ScriptBlock { Invoke-FzfTabCompletion }

Powershell version:

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.22621.4391
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.4391
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Any hints ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant