microsoft / microsoft/terminal
Ignore OSC 7 notifications if host name is not terminal host?
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
I've not read through all of https://github.com/microsoft/terminal/issues/8214 and https://github.com/microsoft/terminal/issues/3158,
but in the recently added support for OSC 7, it [looks like](https://github.com/microsoft/terminal/commit/4ce79d728932b5140b9b8323c40f96d054cd1527#diff-21383c37a75bafb4ee95b4559a8f5b3d421640e19d3aef91cce9a419b28707e9R2630-R2635) when we receive `file://someremoteserver/tmp`, we set the working directory for new tabs to `/tmp`.
This is wrong, because new tabs are opened on the local system.
We should check that it matches (the equivalent of) `gethostname()` and some other cases, see foot source code for example.
cc @lhecker (I wanted to comment on the commit directly but can't right now for some reason (at least when using the Web UI)).
See also:
- https://codeberg.org/dnkl/foot/commit/7466e87a
- https://invent.kde.org/utilities/konsole/-/merge_requests/1049/diffs
- https://www.zsh.org/mla/workers/2026/msg00003.html
Contributor guide
Research direction
Start in the OSC 7 support added by commit 4ce79d728932b5140b9b8323c40f96d054cd1527, especially the handling around the referenced lines, and compare the foot and Konsole implementations linked in the issue. The change is complete when notifications for a non-local host no longer set the working directory for new tabs, while local-host notifications still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100