Powershell Modules for Bash Users

I’ve been trying to get used to PowerShell for a little while now and while it is difficult to adjust coming from other shells, there are some modules I have installed that make it much less of a pain.

Modules are really core to what makes PowerShell extensible and you can read more about them here but they work similar to other OOP languages and just like other interpreted scripting languages, loading too many modules will slow down performance.

With that out of the way, here’s a list of modules to make pwsh more like bash or zsh:

We can just iterate over a list to install these

$modules = @("PSReadLine", "PSFzf", "posh-git")

foreach ($mod in $modules)
{
    Install-Module -Name $mod -Repository PSGallery -Force
}

And then to source, import or configure these modules, edit your $PROFILE

# Posh
Import-Module posh-git

# PSReadLine
Set-PSReadLineOption -EditMode Emacs
Set-PSReadLineOption -BellStyle Visual

# PSFzf
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r'