In search of a dev setup for PowerShell
In search of a better shell experience in PowerShell. Something akin to the Oh My Zsh and Powerlevel10k zsh theme goodness that I am accustomed to on the Linux side.
Oh My Posh is a thing and I'm giving that a try. I'll update this post after playing around with it.
Update:
There are several ways of installing Oh My Posh
on Windows. I used winget in a regular powershell window in Microsoft Terminal) (stdout below)
I won't document the whole process but I'm impressed enough with Oh My Posh
to give it a go as my go to prompt engine for PowerShell.
Some fun screenshots:
Learnings
Some things I learnt along the way:
- There is a difference between
pwsh.exe
(latest, based on.Net Core
) andpowershell.exe
(based on.Net Framework
) - Found the location of the equivalent of
.zshrc/.bashrc
for Powershell. The value is stored in the environment variable called$PROFILE
. You have to create it the first time around. It can be simply done by doingcode $PROFILE
, which will open the file in vscode.
- Fixed a problem that existed on my Windows 11 install.
- Figured out how to increase the maximum amount of previously entered shell commands that are remembered by the shell.
In conclusion
This has given me some basic goodies (shell completion, git information, a pretty shell) that has gone a long way to make me feel comfortable doing shell work in Windows using PowerShell. So far so good, but if there are any wild opinion changes over the course of the next few months of usage, I'll be sure to document them here...until next time!