Skip to content

Instantly share code, notes, and snippets.

@lachiefish
Created March 8, 2023 07:27
Show Gist options
  • Save lachiefish/b9f58ded8fa247a5576615408a31d189 to your computer and use it in GitHub Desktop.
Save lachiefish/b9f58ded8fa247a5576615408a31d189 to your computer and use it in GitHub Desktop.
MS Powershell Profile
Invoke-Expression (&starship init powershell)
###########
# MODULES #
###########
# PSReadLine
Import-Module PSReadLine
# Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
# Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
# Set-PSReadLineKeyHandler -Key Tab -Function Complete
# Terminal-Icons
Import-Module -Name Terminal-Icons
# TabExpansionPlusPlus
Import-Module TabExpansionPlusPlus
# PSfzf
Import-Module PSfzf
Set-PsFzfOption -TabExpansion
# replace 'Ctrl+t' and 'Ctrl+r' with your preferred bindings:
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r'
Set-PSReadLineKeyHandler -Key Tab -ScriptBlock { Invoke-FzfTabCompletion }
# PSUtil
Import-Module PSUtil
# Import the Chocolatey Profile that contains the necessary code to enable
# tab-completions to function for `choco`.
# Be aware that if you are missing these lines from your profile, tab completion
# for `choco` will not function.
# See https://ch0.co/tab-completion for details.
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment