You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To accomplish this, the shell must emit a magic escape sequence that contains the current working directory. I have this working in my custom prompt today with the following segment:
{
"_comment": "// Emit control sequence so Windows Terminal can duplicate tabs / panes to the current working directory. See https://learn.microsoft.com/en-us/windows/terminal/tutorials/new-tab-same-directory",
"type": "text",
"style": "plain",
"template": "{{if .Segments.Path.Location }}\u001b]9;9;\"{{ .Segments.Path.Location }}\"\u001b\\{{ end }}"
}
While it's possible to enable this with a custom segment, terminal's duplication feature has the "wow" factor to the point that I thought it might be worth supporting this in omp directly, either as a part of the default prompt theme, or as a property like emit_windows_terminal_pwd_escape_sequence on the Path segment.
If you feel this doesn't fit with the goals / direction of omp, feel free to close.
Thanks for the awesome work!
The text was updated successfully, but these errors were encountered:
Code of Conduct
What would you like to see changed/added?
Windows Terminal can open a new shell in the same working directory using it's "duplicate pane / tab" feature: https://learn.microsoft.com/en-us/windows/terminal/tutorials/new-tab-same-directory.
To accomplish this, the shell must emit a magic escape sequence that contains the current working directory. I have this working in my custom prompt today with the following segment:
While it's possible to enable this with a custom segment, terminal's duplication feature has the "wow" factor to the point that I thought it might be worth supporting this in omp directly, either as a part of the default prompt theme, or as a property like
emit_windows_terminal_pwd_escape_sequence
on the Path segment.If you feel this doesn't fit with the goals / direction of omp, feel free to close.
Thanks for the awesome work!
The text was updated successfully, but these errors were encountered: