From 5e03b07d9092c456a5464f0c1cd483511f0de530 Mon Sep 17 00:00:00 2001 From: Michael Kelley Date: Sun, 15 Oct 2023 20:09:56 -0700 Subject: [PATCH] Don't use FZF_DEFAULT_COMMAND - Invoke-FuzzySetLocation no longer uses FZF_DEFAULT_COMMAND to ensure proper directory selection - Fixes #229 --- PSFzf.Functions.ps1 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/PSFzf.Functions.ps1 b/PSFzf.Functions.ps1 index 41930fa..e258dd0 100644 --- a/PSFzf.Functions.ps1 +++ b/PSFzf.Functions.ps1 @@ -229,12 +229,7 @@ function Invoke-FuzzySetLocation() { if ($null -eq $Directory) { $Directory = $PWD.ProviderPath } $result = $null try { - if ([string]::IsNullOrWhiteSpace($env:FZF_DEFAULT_COMMAND)) { - Get-ChildItem $Directory -Recurse -ErrorAction Ignore | Where-Object { $_.PSIsContainer } | Invoke-Fzf | ForEach-Object { $result = $_ } - } - else { - Invoke-Fzf | ForEach-Object { $result = $_ } - } + Get-ChildItem $Directory -Recurse -ErrorAction Ignore | Where-Object { $_.PSIsContainer } | Invoke-Fzf | ForEach-Object { $result = $_ } } catch {