-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Setup
In this example, I type ./ and then trigger Invoke-FzfTabCompletion via hotkey:
PS G: \dev> ./
> 21/21
& '.\@ajeetdsouza'
& '.\@casey'
& '.\@cspotcode'
Bug
I choose the second option and press enter:
PS G:\dev> "& '.\@casey'"
PSFzf erroneously wraps the response in double-quotes. The completion entry already has the appropriate quotes along with the & prefix.
Commentary
PowerShell is recognizing when the path includes special characters and needs to be quoted. It also understands that, since this completion item is in the first position, it must be a command to execute, so we need the leading &.
Here are the raw completion entries from PowerShell:
> (TabExpansion2 ./).completionmatches
CompletionText ListItemText ResultType ToolTip
-------------- ------------ ---------- -------
& './@ajeetdsouza' @ajeetdsouza ProviderContainer G:\dev\@ajeetdsouza
& './@casey' @casey ProviderContainer G:\dev\@casey
& './@cspotcode' @cspotcode ProviderContainer G:\dev\@cspotcode
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels