Incorrect symbol escapes #19732

Closed
opened 2026-01-31 06:52:01 +00:00 by claunia · 3 comments
Owner

Originally created by @steve02081504 on GitHub (Apr 19, 2023).

Windows Terminal version

1.16.10261.0

Windows build number

10.0.19045.0

Other Software

No response

Steps to reproduce

profile:

{
    "profiles": [
        {
            "commandline": "\"C:\\Users\\steve02081504\\Documents\\workstation\\Taromati2_workdirs\\ghost_terminal\\Debug\\ghost_terminal.exe\" -gp \"E:\\ssp\\ghost\\Taromati2\\\" -r",
            "hidden": false,
            "icon": "E:\\ssp\\ghost\\Taromati2\\ghost\\master\\img\\ico\\kikka.ico",
            "name": "Taromati2 terminal"
        }
    ]
}

图片

Expected Behavior

Parameters to the exe file should be

  • argv[0]: (exe path)
  • argv[1]: -gp
  • argv[2]: E:\ssp\ghost\Taromati2\
  • argv[3]: -r

Actual Behavior

Parameters to the exe file

  • argv[0]: (exe path)
  • argv[1]: -gp
  • argv[2]: E:\ssp\ghost\Taromati2\" -r
Originally created by @steve02081504 on GitHub (Apr 19, 2023). ### Windows Terminal version 1.16.10261.0 ### Windows build number 10.0.19045.0 ### Other Software _No response_ ### Steps to reproduce profile: ```json { "profiles": [ { "commandline": "\"C:\\Users\\steve02081504\\Documents\\workstation\\Taromati2_workdirs\\ghost_terminal\\Debug\\ghost_terminal.exe\" -gp \"E:\\ssp\\ghost\\Taromati2\\\" -r", "hidden": false, "icon": "E:\\ssp\\ghost\\Taromati2\\ghost\\master\\img\\ico\\kikka.ico", "name": "Taromati2 terminal" } ] } ``` ![图片](https://user-images.githubusercontent.com/31927825/233110664-b279edf0-92ef-42ad-a859-361bee610fe6.png) ### Expected Behavior Parameters to the exe file should be - argv[0]: (exe path) - argv[1]: `-gp` - argv[2]: `E:\ssp\ghost\Taromati2\` - argv[3]: `-r` ### Actual Behavior Parameters to the exe file - argv[0]: (exe path) - argv[1]: `-gp` - argv[2]: `E:\ssp\ghost\Taromati2\" -r`
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 06:52:01 +00:00
Author
Owner

@steve02081504 commented on GitHub (Apr 19, 2023):

To add, this may not be a problem with terminal: consider that the same command does not run correctly under cmd
图片
But the same command can be run under powershell, which is a bit confusing
图片

@steve02081504 commented on GitHub (Apr 19, 2023): To add, this may not be a problem with terminal: consider that the same command does not run correctly under cmd ![图片](https://user-images.githubusercontent.com/31927825/233112842-9f265627-0790-4eb7-92af-7294eea0c6ff.png) But the same command can be run under powershell, which is a bit confusing ![图片](https://user-images.githubusercontent.com/31927825/233113117-afdcd5ba-47dd-48ef-94cb-ec6cb1dbfcaf.png)
Author
Owner

@ianjoneill commented on GitHub (Apr 20, 2023):

So the problem here is the "E:\ssp\ghost\Taromati2\" bit - windows is treating \" as an escaped quote character.

You've got two options:

  1. Drop the last slash, so it's "E:\ssp\ghost\Taromati2"
  2. Add in an extra slash, so it's "E:\ssp\ghost\Taromati2\\".
@ianjoneill commented on GitHub (Apr 20, 2023): So the problem here is the `"E:\ssp\ghost\Taromati2\"` bit - windows is treating `\"` as an escaped quote character. You've got two options: 1. Drop the last slash, so it's `"E:\ssp\ghost\Taromati2"` 2. Add in an extra slash, so it's `"E:\ssp\ghost\Taromati2\\"`.
Author
Owner

@steve02081504 commented on GitHub (Apr 20, 2023):

@ianjoneill Thanks.
I think it was not a bug in terminal but in the program that generates the configuration files.
it has been fixed.

@steve02081504 commented on GitHub (Apr 20, 2023): @ianjoneill Thanks. I think it was not a bug in terminal but in the program that generates the configuration files. it has been fixed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19732