From 52ff424417999be8142c1efcbf9fb52b5394a261 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Fri, 16 Sep 2022 12:38:52 -0500 Subject: [PATCH] refactor(pwsh): only install PSFzf if not found --- dots/.config/powershell/Microsoft.PowerShell_profile.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dots/.config/powershell/Microsoft.PowerShell_profile.ps1 b/dots/.config/powershell/Microsoft.PowerShell_profile.ps1 index a66364c1..8fb6ae4c 100644 --- a/dots/.config/powershell/Microsoft.PowerShell_profile.ps1 +++ b/dots/.config/powershell/Microsoft.PowerShell_profile.ps1 @@ -1,3 +1,7 @@ -Install-Module -Name PSFzf -RequiredVersion 2.5.10 +if (-Not (Get-Module -ListAvailable -Name PSFzf)) +{ + Install-Module -Name PSFzf +} + Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r' Set-PSReadLineKeyHandler -Key Tab -ScriptBlock { Invoke-FzfTabCompletion }