arialdomartini/oh-my-git

WSL (bash in windows) install fix

fizux opened this issue · 0 comments

fizux commented

I had problems using oh-my-git with bash in windows (aka WSL / Windows Subsystem for Linux), specifically getting the Awesome Terminal Fonts to display icons. This ended up working for me...

Install the patched font Droid Sans Mono Awesome, available at:
https://github.com/gabrielelana/awesome-terminal-fonts/blob/patching-strategy/patched/Droid+Sans+Mono+Awesome.ttf?raw=true

Windows recently changed to a "new" console that ignores the legacy console font registry keys, and WSL will not run in legacy console mode. The new reg key will look something like:
HKCU\Console\{asinine_wsl_key}

mine was:
HKEY_CURRENT_USER\Console\C:_Program Files_WindowsApps_CanonicalGroupLimited.UbuntuonWindows_1604.2017.922.0_x64__79rhkp1fndgsc_ubuntu.exe

I used regedit.exe to make the change in the pic below. Look for the entry named "FaceName", and change its string value to "Droid Sans Mono Awesome".
regedit

From the bash shell, run the normal Ubuntu one-liner:
git clone https://github.com/arialdomartini/oh-my-git.git ~/.oh-my-git && echo source ~/.oh-my-git/prompt.sh >> ~/.bashrc

Note that the Droid Awesome font will not show up in the list of selectable fonts from the defaults and properties menu of the bash window. One day, I'll be motivated enough to figure out how to fix that.