I've been recommending people use NerdFonts in their terminals for a while, but using the extra characters ends up being rather a pain. I have to look up characters in their web cheat-sheet, and then I either end up with a whole bunch of "$([char]0xf1ed)$([char]0xf00d)"
in my profile scripts, which is impossible to read, or I have to translate the hex to decimal so I can type the ALT
codes in my editor...
So today I fixed it, using PANSIES (the PowerShell ANSI Escape Sequences module).
In PANSIES output (i.e. via the Write-Host, or by using New-Text
in a string), you can embed named entities like in html. But unlike HTML, Pansies entities are extensible. So I wrote a little script to re-use the css names for the nerd-font characters and generate entities.
Now I can write things like:
Read-Host (Text "Do you use $fg:OrangeRed&nf-fa-firefox;$fg:clear, $fg:SteelBlue&nf-fa-chrome;$fg:clear or $fg:DodgerBlue&nf-fa-edge;$fg:clear")
https://unicode.org/emoji/charts/emoji-ordering.txt