When using a fancy theme in oh-my-posh, and we want to ensure the OSC99 gets registered to recall the previous PWD, make sure to fork the theme and add this to it:
"pwd": "osc99"
Without this, osc99 will not be emitted, thus preventing Windows Terminal from restoring your session.
NOTE: This was corrected thanks to @jandedobbeleer (see comment section). Previously, the key and value was
"osc99": true
Top comments (2)
Even though this still works today, the current way of doing this by adding the following:
"pwd": "osc99"
Thanks! I will edit it :D