In the latest preview build of Windows 10 (14931) the console have been updated to (finally) support more colors! I have updated my Console Extensions module. Read on to learn about the new features.
Write-RGB
A new function that lets you write to the console with 24-bit color support! I have included a new class that you can use to define your own colors, or you can use one of the 132 colors I have included in the ‘colors’ variable.
To be able to define your own colors with the new class, you need to write ‘using module Communary.ConsoleExtensions‘ to get access to it. If you want to include this in the profile, remember that using statements need to be at the top, before anything else.
Colorized file listings
If you don’t want to use the dedicated Invoke-ColorizedFileListing function, I have included a custom formats file, inspired by Joel Bennett, that gives you color when using Get-ChildItem. On top of that, if you have the preview build you get access to 24-bit colors here as well. The colors are customizable through a new global variable – ‘psFileColors‘. On top of that, if you have the PowerShellHumanizer module installed, you can enable humanization of the date and file size fields. This is controlled by the global variable ‘psFormatsOptions‘.
On top of this, Reparse Point targets are shown in the file listing.
Custom Powerline Prompt with Git support
As you might have seen in the screenshots shown so far, I have also included a custom prompt with support for Powerline fonts. To be able to get the most out of this you will need to install a Powerline font, and then call Set-PowerlinePrompt to set the new custom prompt. Your old prompt is saved in the variable ‘originalPrompt’, and you can set this with ‘Set-Prompt $originalPrompt’. You need to install the PSGit module to get git support.
Unfortunately, the support for extra colors is kind of buggy when used in the prompt, so until this is sorted out we have to use the old console colors here. I’ll update the module when this bug is fixed.
If you have any feedback let me know in the comments section below. If you create some nice color scheme for file colorization I’d love for you to share it!