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:
- posh-git - gives a prompt that shows git status
- PSReadLine - gives emacs/vim style keybinds
- PSFzf - brings fzf to the realm of powershell
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
Set-PSReadLineOption -EditMode Emacs
Set-PSReadLineOption -BellStyle Visual
Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r'