Skip to content

Commit

Permalink
Don't use FZF_DEFAULT_COMMAND (#233)
Browse files Browse the repository at this point in the history
- Invoke-FuzzySetLocation no longer uses FZF_DEFAULT_COMMAND to ensure
proper directory selection
- Fixes #229
  • Loading branch information
kelleyma49 authored Oct 16, 2023
1 parent be33c95 commit ae331c9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions PSFzf.Functions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down

0 comments on commit ae331c9

Please sign in to comment.