kelleyma49 / PSFzf

A PowerShell wrapper around the fuzzy finder fzf
MIT License
787 stars 34 forks source link

Onedrive mess up with this plugin #93

Closed BLaurent closed 2 years ago

BLaurent commented 2 years ago

Hi, Thanks for this plugin, I had to switch from linux to windows and this save me a lot of time.

Script version : Install-Module -Name PSFzf -AllowPrerelease

pwsh --version PowerShell 7.2.0

$profile :

Import-Module posh-git
Import-Module oh-my-posh
Import-Module PSFzf
Import-Module ZLocation
Import-Module -Name PSKubectlCompletion

Register-KubectlCompletion

Set-PSReadLineKeyHandler -Key Tab -ScriptBlock { Invoke-FzfTabCompletion }
Set-PSReadlineOption -Color @{
  "Parameter"="$([char]0x1b)[93m"
  "Operator"="$([char]0x1b)[93m"
}
Set-PSReadLineOption -PredictionSource History
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r'
Set-PoshPrompt -Theme powerlevel10k_rainbow

I have onedrive on this pc, and in my home dir I have something like that:

d----          11/24/2021  4:20 PM                kaniko
d-r--          10/27/2021  3:08 PM                Links
d----           11/8/2021  6:22 PM                linux-install
d----           11/8/2021 11:13 PM                linux-wsl
d-r--          10/27/2021  3:08 PM                Music
d----          11/16/2021  6:36 PM                npm-cache
lar--          11/26/2021  4:52 PM                OneDrive - Yahoo
d-r--          10/27/2021  3:08 PM                Saved Games
d----          11/25/2021  4:28 PM                scoop
d-r--          11/23/2021  9:21 AM                Searches
d----          11/23/2021  3:40 PM                tmp
d----          11/19/2021  9:45 AM                video
d-r--          11/10/2021 11:25 AM                Videos

If I do

cd 
cd <TAB>

The terminal is splitted and on the right side I have

 The argument 'C:\Users\Ben\OneDrive' is not recognized as the name of a script file. Check the 
...
Usage: pwsh[.exe] [-Login] [[-File] <filePath> [args]] 
...

As if spaces in path are not protected.

Thanks in advance.

BLaurent commented 2 years ago

After upgrading to pwsh 7.2.1 fix this, very strange.... I am closing this.