Parsing "-d" argument has minor issues #13593

Open
opened 2026-01-31 03:46:55 +00:00 by claunia · 0 comments
Owner

Originally created by @tavrez on GitHub (Apr 23, 2021).

Greeting,
I want to have something like this in registry for some operations:

wt -d "%V"

a small note about %V: for folders when it's resolved it has no \ at the end but for root drives it has(c:\ vs c:\folder).
So the command is going to be in one of these forms:

wt -d "C:\folder"
wt -d "C:\"

First line is fine, however, second line will instantly crash.
The problem with it is the \", which is parsed like ", if I do one of these:

wt -d "c:\\"
wt -d "c:"
wt -d c:\
wt -d c:

Everything become perfect, however, this is not something %V is going to be resolved into.
I also cannot use wt -d %V(without quotes) in registry, because it makes trouble for folders with space.

Originally created by @tavrez on GitHub (Apr 23, 2021). Greeting, I want to have something like this in registry for some operations: ```cmd wt -d "%V" ``` **a small note about `%V`:** for folders when it's resolved it has no `\` at the end but for root drives it has(`c:\` vs `c:\folder`). So the command is going to be in one of these forms: ```cmd wt -d "C:\folder" wt -d "C:\" ``` First line is fine, however, second line will instantly crash. The problem with it is the `\"`, which is parsed like `"`, if I do one of these: ```cmd wt -d "c:\\" wt -d "c:" wt -d c:\ wt -d c: ``` Everything become perfect, however, this is not something `%V` is going to be resolved into. I also cannot use `wt -d %V`(without quotes) in registry, because it makes trouble for folders with space.
claunia added the Resolution-Duplicate label 2026-01-31 03:46:55 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13593