Commit 4ce79d7
authored
Implement OSC 7 for setting the CWD (#20019)
This adds support for OSC 7 which is the same as OSC 9;9 but using
file URIs. As per the previous discussion in #8214, the problem is
that WSL shells emit URIs that can't work because the hostname in
the URI translates to an UNC path with an non-existing hostname.
In my opinion this doesn't deter the fact though that OSC 7 works
just fine for a native Windows application.
In the future we should consider trying to detect WSL file URIs
and translating it to the `--cd` argument for `wsl.exe`.
All of the heavy lifting for parsing the URI is done by
`PathCreateFromUrlW`. It just had to be plugged into the OSC 9;9 code.
Closes #3158
## Validation Steps Performed
* Launch fish-shell in WSL
* Duplicate tab works ✅
* (And because it doesn't work without using
`IsValidDirectory` I know that OSC 7 works ✅)1 parent 69e4590 commit 4ce79d7
File tree
16 files changed
+46
-28
lines changed- src
- cascadia
- TerminalApp
- TerminalControl
- terminal
- adapter
- parser
- types
- inc
16 files changed
+46
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1475 | 1475 | | |
1476 | 1476 | | |
1477 | 1477 | | |
1478 | | - | |
| 1478 | + | |
1479 | 1479 | | |
1480 | 1480 | | |
1481 | 1481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1600 | 1600 | | |
1601 | 1601 | | |
1602 | 1602 | | |
1603 | | - | |
1604 | | - | |
| 1603 | + | |
1605 | 1604 | | |
1606 | 1605 | | |
1607 | 1606 | | |
| |||
3555 | 3554 | | |
3556 | 3555 | | |
3557 | 3556 | | |
3558 | | - | |
3559 | | - | |
| 3557 | + | |
3560 | 3558 | | |
3561 | 3559 | | |
3562 | 3560 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2420 | 2420 | | |
2421 | 2421 | | |
2422 | 2422 | | |
2423 | | - | |
2424 | | - | |
2425 | | - | |
2426 | | - | |
2427 | | - | |
2428 | 2423 | | |
2429 | 2424 | | |
2430 | 2425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | | - | |
196 | 194 | | |
197 | 195 | | |
198 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | 63 | | |
66 | 64 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3719 | 3719 | | |
3720 | 3720 | | |
3721 | 3721 | | |
3722 | | - | |
3723 | | - | |
3724 | | - | |
3725 | | - | |
3726 | 3722 | | |
3727 | 3723 | | |
3728 | 3724 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
122 | 120 | | |
123 | 121 | | |
124 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
159 | | - | |
160 | 160 | | |
161 | | - | |
162 | 161 | | |
163 | | - | |
164 | 162 | | |
165 | | - | |
166 | 163 | | |
167 | 164 | | |
168 | 165 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2615 | 2615 | | |
2616 | 2616 | | |
2617 | 2617 | | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
| 2622 | + | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
| 2630 | + | |
| 2631 | + | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
| 2637 | + | |
| 2638 | + | |
2618 | 2639 | | |
2619 | 2640 | | |
2620 | 2641 | | |
| |||
0 commit comments