Replies: 3 comments
-
I believe what you need is #3719. |
Beta Was this translation helpful? Give feedback.
-
Another option would be to query the palette value with something like I don't how you'd do that in PowerShell though. I was expecting something like this: $save = Read-Host -Prompt "`e]4;262;?`e\" But you need to be able to tell It's also worth mentioning that the palette query support was only just added (PR #17729), so you'd need to be using Windows Terminal Preview. |
Beta Was this translation helpful? Give feedback.
-
I've been looking into using a different background color while a command is running. My specific use case is to log into a remote server via SSH, and while I'm logged in, have a different background color.
I got that mostly working. I've written a function that resides in my powershell profile file.
It's as easy as:
This nicely changes the background to a dark yellow color.
However, I'm currently struggling to reset the color to its original color. I've found information that it's apparently possible to query the current active color, store it, and change it back when you're done, if I understood this correctly: #13091.
I just don't know how to write this in powershell.
Does anyone have an idea?
Beta Was this translation helpful? Give feedback.
All reactions