STILL Can't bypass DOSkey macro with leading space #21396

Closed
opened 2026-01-31 07:43:26 +00:00 by claunia · 10 comments
Owner

Originally created by @cniggeler on GitHub (Mar 14, 2024).

Windows Terminal version

1.19.10573.0

Windows build number

10.0.22621.3296

Other Software

No response

Steps to reproduce

Please see #4189. It is the exactly the same. This was merged with #13476 which was closed-fixed, but it is not fixed. Since I can't reopen 4189 I've created a new one here per github rules.

Expected Behavior

If you put a space before a DOSKey macro that has the same name as a built-in command, the built-in command is supposed to run.

Actual Behavior

The DOSKey macro runs.

Originally created by @cniggeler on GitHub (Mar 14, 2024). ### Windows Terminal version 1.19.10573.0 ### Windows build number 10.0.22621.3296 ### Other Software _No response_ ### Steps to reproduce Please see [#4189](https://github.com/microsoft/terminal/issues/4189). It is the exactly the same. This was merged with [#13476](https://github.com/microsoft/terminal/pull/13476) which was closed-fixed, but it is not fixed. Since I can't reopen 4189 I've created a new one here per github rules. ### Expected Behavior If you put a space before a DOSKey macro that has the same name as a built-in command, the built-in command is supposed to run. ### Actual Behavior The DOSKey macro runs.
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 07:43:27 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 14, 2024):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@github-actions[bot] commented on GitHub (Mar 14, 2024): Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! ### Open similar issues: - [doskey macros broken for inputs with >1 consecutive whitespace (#15736)](https://github.com/microsoft/terminal/issues/15736), similarity score: 0.84 ### Closed similar issues: - [Can't bypass DOSkey macro with leading space (#4189)](https://github.com/microsoft/terminal/issues/4189), similarity score: 1.00 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@DHowett commented on GitHub (Mar 14, 2024):

@lhecker did we regress this in the cooked read rewrite of 2023?

@DHowett commented on GitHub (Mar 14, 2024): @lhecker did we regress this in the cooked read rewrite of 2023?
Author
Owner

@DHowett commented on GitHub (Mar 14, 2024):

@cniggeler weird! I absolutely can bypass DOSkey macros with a leading space.

image

image

Can you share more information about your setup?

@DHowett commented on GitHub (Mar 14, 2024): @cniggeler _weird!_ I absolutely can bypass DOSkey macros with a leading space. <img width="430" alt="image" src="https://github.com/microsoft/terminal/assets/189190/c6bacbf2-b6dd-4284-a144-cd72377031a5"> ![image](https://github.com/microsoft/terminal/assets/189190/6a533094-7e62-4d81-9ef5-0b5dbe84d00e) Can you share more information about your setup?
Author
Owner

@DHowett commented on GitHub (Mar 14, 2024):

FWIW, from the exact repro steps

image

@DHowett commented on GitHub (Mar 14, 2024): FWIW, from the exact repro steps ![image](https://github.com/microsoft/terminal/assets/189190/9365ea28-2c95-44a6-b4ce-fe97a13d1558)
Author
Owner

@cniggeler commented on GitHub (Mar 14, 2024):

Here's what I get. Laptop, converted Win-11 S mode to Win 11 Home.
doskey

@cniggeler commented on GitHub (Mar 14, 2024): Here's what I get. Laptop, converted Win-11 S mode to Win 11 Home. ![doskey](https://github.com/microsoft/terminal/assets/16118897/5a0c7cd7-ef77-4f41-99f3-b1556f9bef48)
Author
Owner

@lhecker commented on GitHub (Mar 14, 2024):

That's certainly not Windows Terminal 1.19.10573.0 as you mentioned in your issue though. The older Windows Console Host that you're using only gets updates every couple years whenever there's a major Windows update. The next update will come out later this year and will have the fix.

@lhecker commented on GitHub (Mar 14, 2024): That's certainly not Windows Terminal 1.19.10573.0 as you mentioned in your issue though. The older Windows Console Host that you're using only gets updates every couple years whenever there's a major Windows update. The next update will come out later this year and will have the fix.
Author
Owner

@cniggeler commented on GitHub (Mar 15, 2024):

My bad. I thought that conhost was a part of terminal. I have opened a wt.exe session with default Command Prompt and the space in front of the command does work as it should! Closing this ticket...

@cniggeler commented on GitHub (Mar 15, 2024): My bad. I thought that conhost was a part of terminal. I have opened a wt.exe session with default Command Prompt and the space in front of the command does work as it should! Closing this ticket...
Author
Owner

@iamqiz commented on GitHub (Apr 9, 2024):

the issue still exist in terminal preview 1.20.10822.0
Clip_2024-04-09_21-06-48

@iamqiz commented on GitHub (Apr 9, 2024): the issue still exist in terminal preview 1.20.10822.0 ![Clip_2024-04-09_21-06-48](https://github.com/microsoft/terminal/assets/48077521/5ac471f7-bb9d-4f6c-877b-eb89c0ccfe59)
Author
Owner

@iamqiz commented on GitHub (Apr 9, 2024):

@DHowett the first "dir" is "dir /b"
the second "dir" is original dir
they are not same

@iamqiz commented on GitHub (Apr 9, 2024): @DHowett the first "dir" is "dir /b" the second "dir" is original dir they are not same
Author
Owner

@DHowett commented on GitHub (Apr 9, 2024):

@iamqiz you demonstrated bypassing the alias abc by putting a space in front of it. That is the intended behavior. The bug in this report was that it did not work. It works now. The dir example is the same premise.

If you are having an issue which is not “I cannot bypass an alias by adding a space in front of it”, please file a new bug.

@DHowett commented on GitHub (Apr 9, 2024): @iamqiz you demonstrated bypassing the alias `abc` by putting a space in front of it. That is the intended behavior. The bug in this report was that it did not work. It works now. The `dir` example is the same premise. If you are having an issue which is not “I cannot *bypass* an alias by adding a space in front of it”, please file a new bug.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21396