Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Windows Terminal duplicate tab/pane with current directory

May
12,795
158
If you run TCC in Windows Terminal and use duplicate tab (Ctrl-Shift-d) or duplicate pane (Alt-Shift-d) you can get the new tab/pane to have the same working directory by prefixing your PROMPT with

Code:
$e]9;9;"$P"$e\

That sequence is commonly called OSC9;9. OSC means OperatingSystemCommand. ESC] (OSC) is its initiator and ESC\ (ST) is its terminator. I believe OSC9;9 comes from ConEmu. The sequence simply tells the terminal what your CWD is.

There is a Microsoft article on the syntax for doing the same thing in various other shells but I don't at the moment have a link to it.
 
Back
Top