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

The Function 'Invoke-FuzzySetLocation' only lists Files #229

Closed
Dominiquini opened this issue Aug 22, 2023 · 1 comment · Fixed by #233
Closed

The Function 'Invoke-FuzzySetLocation' only lists Files #229

Dominiquini opened this issue Aug 22, 2023 · 1 comment · Fixed by #233

Comments

@Dominiquini
Copy link

When I call 'Invoke-FuzzySetLocation', the 'fzf' only list files, instead of directories, making it impossible to change the Location!

OS: Windows x64
Terminal: PowerShell 7.3.6
PSFzf: 2.5.16

Thanks.

@Dominiquini
Copy link
Author

I found the problem:

I change this code:

    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 = $_ }
        }
    }
    catch {

    }

For this:

    try {
        Get-ChildItem $Directory -Recurse -ErrorAction Ignore | Where-Object { $_.PSIsContainer } | Invoke-Fzf | ForEach-Object { $result = $_ }
    }
    catch {

    }

kelleyma49 added a commit that referenced this issue Oct 16, 2023
- Invoke-FuzzySetLocation no longer uses FZF_DEFAULT_COMMAND to ensure
proper directory selection
- Fixes #229
kelleyma49 added a commit that referenced this issue Oct 16, 2023
- Invoke-FuzzySetLocation no longer uses FZF_DEFAULT_COMMAND to ensure
proper directory selection
- Fixes #229
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

Successfully merging a pull request may close this issue.

1 participant