Last active
October 15, 2021 23:49
-
-
Save skyline75489/784548403f230bfa2769556a0e4cc9d7 to your computer and use it in GitHub Desktop.
Windows Terminal OSC 7 for CMD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROMPT=$E]7;file://%COMPUTERNAME%/$P$E\$P$G |
OK, I see what you were getting at now - this works for me. I misinterpreted what you said about the variable only being evaluated the first time, so I thought at first that this version would update in "real time" (i.e. if the computer name changed during a particular session), but that's definitely not essential. This is good enough for me.
It doesn't work for me. I'm using it to open new tabs/splits in Windows Terminal in he same directory. Your powershell prompt worked. But for cmd this appears to do nothing.
yeah you have use osc]9;9 for it to work on wt rn
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
oh, I know what's going on, its my fault, the double % strategy only works if using setx like this:
then restart cmd