I was about to start a Wes Bos' course while using a computer with windows and I realized how uggly is powerShell (and cmd and whatsoever), even when I had already installed ubuntu as WSL and even after installed the new windows terminal (Currently on Beta) so, as a good procrastinator, I decided to have a, at least, decent terminal before start. It may not be needed but it will calm my tatas.
I'm pretty sure I starter reading this
At some point I was reading this and I know I copied based my config on a profile/scheme named "UbuntuLegit" so:
-
On Windows, install chocolate (package manager)
-
Then install FiraCode
=> Once installed chocolatey, on a PowerShell with Admin priviledges run
choco install firacode=> This is to install it for Windows Terminals, for WSL:sudo apt update | sudo apt upgradesudo apt install fonts-firacode
Install PIP for python packages
sudo apt install python-pip
-Following instructions given @ b-ryan's powerline-shell
`pip install powerline-shell`
-Add the following to the .bashrc profile (@ ~/):
#Add the following to your .bashrc file:
function _update_ps1() {
PS1=$(powerline-shell $?)
}
if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]];
then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fiThe file config.json is to be copied to ~/.config/powerline-shell as part of poweline-shell's configuration.
The configuration file is explained at b-ryans' project (link above, DUH !)
To actually have more than one terminal setting on the new Window's terminal it is needed to make some adjustments on its settings. Mine are on the profile file. I added some keybindings since the default file doesn't have any and coming from Fish it feels strange to not have ctrl + t
These are my current settings on vscode
Make Win32 PATH accessible from WSL (Seems to be a way here )
No longer needed. Acording to this article to run Win exes from WSL it is just needed to write:
app.exe for example notepad.exe, as long as the executable is on Windows' PATH it should work.