Add a new (advanced) profile setting, pathTranslationStyle (#18195)

`pathTranslationStyle` has four options:

- `none`: Do no translation
- `wsl`: Translate `C:\` to `/mnt/c` and `\\wsl$\Foo\bar` to `/bar`
- `cygwin`: Translate `C:\` to `/cygdrive/c`
- `msys2`: Translate `C:\` to `/c`

It is intended as a broadly-supported replacement for us checking the
source every time the user drops a path.

We no longer need to push the source name all the way down to the
control.

I am hesitant to commit to using other folks' product names in our
settings model,
however, these are almost certainly more recognizable than whatever
other weird
names we could come up with.

The Git Bash fragment extension profile could conceivably use
`pathTranslationStyle`
`msys2` to make sure drag/dropped paths look right.
This commit is contained in:
Dustin L. Howett
2024-11-15 17:55:34 -06:00
committed by GitHub
parent 90866c7c93
commit 068906714f
22 changed files with 150 additions and 68 deletions

View File

@@ -3095,6 +3095,17 @@
"default": false,
"description": "When set to true, the window will have an acrylic material background. When set to false, the window will have a plain, untextured background.",
"type": "boolean"
},
"pathTranslationStyle": {
"default": "none",
"description": "Controls how file paths are transformed when they are dragged and dropped on the terminal. Possible values are \"none\", \"wsl\", \"cygwin\" and \"msys2\".",
"enum": [
"none",
"wsl",
"cygwin",
"msys2"
],
"type": "string"
}
}
},