jdhitsolutions / PSScriptTools

:wrench: :hammer: A set of PowerShell functions you might use to enhance your own functions and scripts or to facilitate working in the console. Most should work in both Windows PowerShell and PowerShell 7, even cross-platform. Any operating system limitations should be handled on a per command basis. The Samples folder contains demonstration script files
MIT License
875 stars 110 forks source link

ANSI style on powershell 7 when PSStyle is defined #147

Closed jdhitsolutions closed 1 month ago

jdhitsolutions commented 3 months ago

Discussed in https://github.com/jdhitsolutions/PSScriptTools/discussions/146

Originally posted by **cderv** April 4, 2024 Hi, I wanted the `-ansi` to work with `Show-Tree` but I understand the `$PSAnsiMap` is not loaded because I have some `$PSStyle` defined - not sure if this is something I loaded or default in Windows Terminal. My understanding is that `$PSAnsiMap` is not loaded to no conflict, but it seems `-ansi` doesn't use `PSStyle`. Is there any way to have the coloring works for functions that supports it ? thank you
jdhitsolutions commented 1 month ago

I am working on an update to the command that will use PSStyle file settings if detected.

jdhitsolutions commented 1 month ago

This should be handled in v2.49.0