Developer Command Prompt profile does not work #15598

Closed
opened 2026-01-31 04:43:04 +00:00 by claunia · 9 comments
Owner

Originally created by @trippwill on GitHub (Oct 20, 2021).

Windows Terminal version (or Windows build number)

1.12.2922.0

Other Software

Visual Studio 2022 Preview
Visual Studio 2019

Steps to reproduce

Open WT.
Open a Developer Command Prompt profile

Expected Behavior

It to work correctly

Actual Behavior

image

Originally created by @trippwill on GitHub (Oct 20, 2021). ### Windows Terminal version (or Windows build number) 1.12.2922.0 ### Other Software Visual Studio 2022 Preview Visual Studio 2019 ### Steps to reproduce Open WT. Open a Developer Command Prompt profile ### Expected Behavior It to work correctly ### Actual Behavior ![image](https://user-images.githubusercontent.com/5862883/138150924-bbd69513-6b9d-451c-8c76-55578d52ff27.png)
Author
Owner

@trippwill commented on GitHub (Oct 20, 2021):

@heaths we seem to have a misplaced quotation mark somehwere

@trippwill commented on GitHub (Oct 20, 2021): @heaths we seem to have a misplaced quotation mark somehwere
Author
Owner

@DHowett commented on GitHub (Oct 20, 2021):

OH NO.

@lhecker LR"("cmd.exe for sure emits a stray " in the string.

How did this pass testing?
d

@DHowett commented on GitHub (Oct 20, 2021): OH NO. @lhecker `LR"("cmd.exe` for sure emits a stray `"` in the string. How did this pass testing? d
Author
Owner

@DHowett commented on GitHub (Oct 20, 2021):

This is a headlining feature for 1.12. We may want to literally back-to-back service it with the release ;P

@DHowett commented on GitHub (Oct 20, 2021): This is a headlining feature for 1.12. We may want to literally back-to-back service it with the release ;P
Author
Owner

@lhecker commented on GitHub (Oct 20, 2021):

I'm very sorry for this issue.
I failed to test my changes again after I changed the string literal to a raw string literal right before committing it. 😔

@lhecker commented on GitHub (Oct 20, 2021): I'm very sorry for this issue. I failed to test my changes again after I changed the string literal to a raw string literal right before committing it. 😔
Author
Owner

@DHowett commented on GitHub (Oct 20, 2021):

I deserve some of the blame here for rushing the change to completion.

@DHowett commented on GitHub (Oct 20, 2021): I deserve some of the blame here for rushing the change to completion.
Author
Owner

@heaths commented on GitHub (Oct 20, 2021):

Honestly, I saw that in code and had to look up what LR did (I was familiar with L) and the documentation shows it as well 😬:

image

Or is this just a case that one of them didn't have a trailing ")" and instead )"?

@heaths commented on GitHub (Oct 20, 2021): Honestly, I saw that in code and had to look up what `LR` did (I was familiar with `L`) and the [documentation](https://docs.microsoft.com/en-us/cpp/cpp/string-and-character-literals-cpp?view=msvc-160#:~:text=auto%20R2%20%3D%20%20LR%22(%22Hello%20%5C%20world%22)%22%3B) shows it as well 😬: <img width="420" alt="image" src="https://user-images.githubusercontent.com/1532486/138164963-99669823-1968-44e8-a0f6-c54dde40cadd.png"> Or is this just a case that one of them didn't have a trailing `")"` and instead `)"`?
Author
Owner

@lhecker commented on GitHub (Oct 20, 2021):

@heaths The usage is similar to the "heredoc" concept and the syntax is:
image

LR"(" Hello \ world")" for instance is the same as L"\"Hello \\ world\"".
If you want change the "delimiters" then you need to put them outside of the parentheses. For instance in our defaults.json we have:

{ "command": "quakeMode", "keys":"win+sc(41)" },

You couldn't put this line into a regular raw string literal because the )" would signal the end of it. So you need to write this for instance:

LR"#({ "command": "quakeMode", "keys":"win+sc(41)" },)#"

That way the end of the literal is only reached if the characters )#" are encountered.
Ending the literal in ")" wouldn't have fixed the issue unfortunately.

@lhecker commented on GitHub (Oct 20, 2021): @heaths The usage is similar to the ["heredoc"](https://en.wikipedia.org/wiki/Here_document) concept and the syntax is: ![image](https://user-images.githubusercontent.com/2256941/138165498-395766be-519d-4cf8-b4a7-fe4d4039f73f.png) `LR"(" Hello \ world")"` for instance is the same as `L"\"Hello \\ world\""`. If you want change the "delimiters" then you need to put them outside of the parentheses. For instance in our defaults.json we have: ```json { "command": "quakeMode", "keys":"win+sc(41)" }, ``` You couldn't put this line into a regular raw string literal because the `)"` would signal the end of it. So you need to write this for instance: ```cpp LR"#({ "command": "quakeMode", "keys":"win+sc(41)" },)#" ``` That way the end of the literal is only reached if the characters `)#"` are encountered. Ending the literal in `")"` wouldn't have fixed the issue unfortunately.
Author
Owner

@heaths commented on GitHub (Oct 20, 2021):

Thanks. I've been doing C/C++ for over 30 years - mostly targeting Windows - and had never run into these before. Good to know, and I can see plenty of use going forward rather than having to escape all over. I use heredocs in Go and other languages quite a bit. Definitely have their uses!

@heaths commented on GitHub (Oct 20, 2021): Thanks. I've been doing C/C++ for over 30 years - mostly targeting Windows - and had never run into these before. Good to know, and I can see plenty of use going forward rather than having to escape all over. I use heredocs in Go and other languages quite a bit. Definitely have their uses!
Author
Owner

@ghost commented on GitHub (Oct 21, 2021):

:tada:This issue was addressed in #11554, which has now been successfully released as Terminal Preview v1.12.2931.0.🎉

Handy links:

@ghost commented on GitHub (Oct 21, 2021): :tada:This issue was addressed in #11554, which has now been successfully released as `Terminal Preview v1.12.2931.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.12.2931.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15598