Before we proceed further, I will quickly install my shell next, so I don’t go insane from using bash.
Of course, you can use any shell you want.
In my case, I’ll be using nushell.
I am using nu because of its nice functionalityread: I use rust btw.
Install missing tools
To properly utilize my nu setup, I need to have the following tools available
I’m using the terminal emulator WezTerm to run WSL.
There is a weird behaviour however with nushell, where a \n gets inserted above the prompt on every keystroke.
If you look inside ~/.config/nushell/config.nu
osc133 is disabled while using WezTerm, mitigating the aformentioned issue.
This works flawlessly in windows, but unfortunately wezterm_pane isn’t automatically set within wsl.
To hack this, i just added an export to my ~/.bashrc
Set it as default
If you remember correctly, we set the login shell to bash when creating the custom user,
so you might wonder why we didn’t directly set it to nu.
Well nushell isn’t POSIX compliant, and neither does it want to be.
Therefore running nu as a login shell might not be the absolute best experience you’ll ever have.
Instead, we populate the .bashrc with some scripting that will let nu take over any interactive shell,
while scripts, etc. that expect a POSIX compliant shell can have their way.