-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
Summary of the new feature/enhancement
It would be helpful to be see the output from Get-Member or from reflection in a color.
It would be even better if that colorization could support changes in the Windows Terminal color scheme.
Proposed technical implementation details
I'm pretty sure this could be accomplished with the build-in formatting engine. In fact, I've prototyped an example.
This is it running under the default color scheme of PowerShell in Terminal:

This is it running under the 'Jackie Brown' color scheme of PowerShell on Kali-Linux on WSL:
![[console] | Get-Member -Static | Format-Table -View Get-Member-In-Color](https://github.com/StartAutomating/EZOut/raw/Get-Member-Colorized/Assets/Get-Member-In-Color-Console-Static.gif)
These are from EZOut, a module that produces .format.ps1xml and .types.ps1xml files. This module already has a couple of colorized views for reflection, visible with Format-Custom:
While these improve my own experience of using PowerShell, I think it would benefit PowerShell overall to include some formatting like this "in the box".
What would be needed to redefine the formatter for a given built-in type?
![[string] | Format-Custom -view System.Type.Full](https://github.com/StartAutomating/EZOut/raw/master/Assets/System.Type.Full.gif)