kelleyma49 / PSFzf

A PowerShell wrapper around the fuzzy finder fzf
MIT License
819 stars 37 forks source link

Tab disabled by PSFzf? #12

Closed Praful closed 3 years ago

Praful commented 7 years ago

Hello

I've enabled PSFzf with the commands:

Remove-PSReadlineKeyHandler 'CTRL+R'
Import-Module PSFzf

This all works. However, when I'm in PowerShell, the tab key does nothing!

If I use

Import-Module PSFzf -ArgumentList 'Ctrl+T','Ctrl+R', 'Tab'

Then I get fzf invoked when I press tab.

How do I get the default tab behaviour whilst using PSfzf. Note tab works fine when using just PSReadline and fzf.

I'm using Windows 10 Creators Update with PowerShell 5.1.

Thanks Praful

kelleyma49 commented 7 years ago

Sorry for the delayed response. I haven't been able to recreate this issue. can you copy and paste your $error output like this:

PS> $error

Praful commented 7 years ago

Hello

If I open a new PowerShell console after setting

Remove-PSReadlineKeyHandler 'CTRL+R'
Import-Module PSFzf

and typing PS> $error, the following appears:

FindPathsInLastCommand : The term 'FindPathsInLastCommand' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:6 char:3
+         FindPathsInLastCommand
+         ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (FindPathsInLastCommand:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I searched this error and saw a reference to another module by you, Fasdr. I installed this and am getting the above error.

Praful commented 7 years ago

Hello

I looked a bit further into this whilst learning PowerShell.

If I don't load PSFzf but load Fasdr, I get the same issue ie pressing tab does not autocomplete the command/file/directory. So the issue seems to be Fasdr rather than PSFzf.

For now, I have this in my $profile:

Remove-PSReadlineKeyHandler 'CTRL+R'
Import-Module PSFzf
# BUG: this prevents autocompletion working. Remove for now
Remove-Module Fasdr

Obviously, this results in not having Fasdr functionality but the other features of PSFzf are worth having!

The $error command returns nothing.

HTH Praful

Konfekt commented 3 years ago

Is this issue still open? It seems that the latest version PSFzf does not load Fasdr by default anymore as there is no Set-Frecent command availabe after loading PSFzf.

Konfekt commented 3 years ago

See also https://github.com/kelleyma49/fasdr/issues/21

kelleyma49 commented 3 years ago

I introduced a breaking change in order to improve startup PSFzf startup times. See this link for more information: https://github.com/kelleyma49/PSFzf/issues/23#issuecomment-615988014

Konfekt commented 3 years ago

Thank you. This issue could then be closed, lest someone fear problems that no longer exist.