[PR #14991] Fix console aliases not working #30335

Open
opened 2026-01-31 09:40:10 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/14991

State: closed
Merged: Yes


#14745 contains two regressions related to console alias handling:

  • When ProcessAliases expands the backup buffer into (an) aliased
    command(s) it changes the _bytesRead field of COOKED_READ_DATA,
    requiring us to re-read it and reconstruct the input string-view.
  • Multiline aliases are read line-by-line whereas #14745 didn't treat
    them any different from regular single-line inputs.

Validation Steps Performed

In cmd.exe run

doskey test=echo foo$Techo bar$Techo baz
test

The output should look exactly like this:

C:\>doskey test=echo foo$Techo bar$Techo baz

C:\>test
foo

C:\>bar

C:\>baz

C:\>
**Original Pull Request:** https://github.com/microsoft/terminal/pull/14991 **State:** closed **Merged:** Yes --- #14745 contains two regressions related to console alias handling: * When `ProcessAliases` expands the backup buffer into (an) aliased command(s) it changes the `_bytesRead` field of `COOKED_READ_DATA`, requiring us to re-read it and reconstruct the `input` string-view. * Multiline aliases are read line-by-line whereas #14745 didn't treat them any different from regular single-line inputs. ## Validation Steps Performed In `cmd.exe` run ``` doskey test=echo foo$Techo bar$Techo baz test ``` The output should look exactly like this: ``` C:\>doskey test=echo foo$Techo bar$Techo baz C:\>test foo C:\>bar C:\>baz C:\> ```
claunia added the pull-request label 2026-01-31 09:40:10 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30335