DEV Community

Louis
Louis

Posted on

Note about oh-my-posh, pwsh, wt + OSC99

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"
Enter fullscreen mode Exit fullscreen mode

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)

Collapse
 
jandedobbeleer profile image
Jan De Dobbeleer • Edited

Even though this still works today, the current way of doing this by adding the following: "pwd": "osc99"

Collapse
 
louisgv profile image
Louis

Thanks! I will edit it :D