kelleyma49 / PSFzf

A PowerShell wrapper around the fuzzy finder fzf
MIT License
795 stars 36 forks source link

Key chords do not always register when Import-Module is run in $PROFILE #33

Closed kalingibbons closed 3 years ago

kalingibbons commented 4 years ago

I'm finding that the module import process is not working from the $PROFILE configuration file. On my work computer, I got it to work consistently by moving the import statement from the top of $PROFILE to the bottom, but it has not been effective for my laptop. I always have to wait for powershell to load, then run the import statement manually. I assume powershell is loading something asynchronously that is overwriting the chords, but I don't know enough about it to figure out what it could be.

Here's a snippet from my $PROFILE with the imports.

# Modules
Import-Module PSReadLine
Import-Module PSFzf -ArgumentList 'Ctrl+t', 'Alt+r' -Force
Import-Module Get-ChildItemColor

# Module settings
Set-PSReadLineOption -EditMode Vi

Does anyone have a trick to make sure the chords always work?

kelleyma49 commented 4 years ago

Try using the new command Set-PsFzfOptions in the v1.2.00 release:

Release notes: https://github.com/kelleyma49/PSFzf/releases/tag/v1.2.00 Module link: https://www.powershellgallery.com/packages/PSFzf/1.2.0

kelleyma49 commented 3 years ago

Closing this as I haven't heard a response, so I'm assuming my suggestion worked :)