简体   繁体   中英

How to change my font in powershell using $Profile

I am trying to work on customizing my powershell 7 experience using $Profile and settings.json. The first issue I am running into is that when I call

oh-my-posh init pwsh | Invoke-Expression Import-Module posh-git

in $Profile to access the updated nerdfont I have downloaded "CaskaydiaCove NF Mono" it does not load into my environment.

Note: There is every possibility that I am looking in the wrong place so feel free to suggest other avenues to accomplishing this.

I have successfully been able to get it to work by Launching terminal, editing the settings on the GUI and then launching powershell 7 from the dropdown. However I want to be able to manually make changes with $Profile and settings.json.

It seems like the issue is that I don't have a command in my $Profile to connect to settings.json to allow it to read the file but I cannot find a recommendation on how to do that.

The font is a setting of your terminal, not Powershell. So, have a look at the docs for your terminal on how to change the font there once it's installed on your system.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM