Unable to read arSC files, I started playing PowerShell again. Probably just changed the font, put an Oh-my-Posh, and incidentally changed the system encoding back to Unicode UTF8
The original link 🔗 blog.boileryao.com/2018/12/pow…
Prepare font files
This step isn’t necessary, but it’s recommended if your Current PowerShell fonts don’t suit your aesthetic.
PowerShell supports system-installed external fonts, but has special requirements for fonts, so most fonts are ruthlessly filtered out in the Properties -> Font -> Font list.
Recommended to this warehouse (github.com/powerline/f…) To choose the font you like. If you have no experience with Git and don’t want to learn about it, download the zip and take your time. Here’s an elegant way to download a specific font (aka. Part of this warehouse folder) :
mkdir powerline
git remote add origin https://github.com/powerline/fonts
git config core.sparsecheckout true
# Select UbuntuMono font
echo UbuntuMono >> .git/info/sparse-checkout
git pull origin master
Copy the code
Then open file Manager/Font Manager and install the fonts. Some fonts do not support specific characters. You are advised to modify the fonts after all configurations to control variables.
Oh – my – posh
To avoid permission problems, you are advised to run the system as an administrator
# Install Oh-my-posh and dependencies
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
# enable oh - my - posh
Import-Module oh-my-posh
Set-Theme Agnoster
Copy the code
Configure self-boot (similar to.bashrc for Linux)
if ( -Not (Test-Path $PROFILE)) {New-Item -Path $PROFILE -Type File
}
notepad $PROFILE
Copy the code
Then add a line import-module oh-my-posh (if not available)
Of course, you can add cowsay, Parrotsay, sl, etc. if you like, these commands will be executed at each startup.
To start playing
The end result should look something like this
The original link 🔗 blog.boileryao.com/2018/12/pow…
Ref:
www.ithome.com/html/win10/…