[PR #14991] [MERGED] Fix console aliases not working #30330

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14991
Author: @lhecker
Created: 3/14/2023
Status: ✅ Merged
Merged: 3/17/2023
Merged by: @carlos-zamora

Base: main ← Head: dev/lhecker/8000-TranslateUnicodeToOem-fixup


📝 Commits (3)

  • 612baad Fix console aliases not working
  • 470b02c Fix formatting
  • 1924a7e Defensive coding practices sponsored by MtnDustin

📊 Changes

4 files changed (+47 additions, -40 deletions)

View changed files

📝 .github/actions/spelling/expect/expect.txt (+1 -18)
📝 src/host/inputReadHandleData.cpp (+1 -1)
📝 src/host/readDataCooked.cpp (+27 -11)
📝 src/host/stream.cpp (+18 -10)

📄 Description

#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:\>

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/14991 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 3/14/2023 **Status:** ✅ Merged **Merged:** 3/17/2023 **Merged by:** [@carlos-zamora](https://github.com/carlos-zamora) **Base:** `main` ← **Head:** `dev/lhecker/8000-TranslateUnicodeToOem-fixup` --- ### 📝 Commits (3) - [`612baad`](https://github.com/microsoft/terminal/commit/612baadff896284f1fa0844fdfc370978d125bad) Fix console aliases not working - [`470b02c`](https://github.com/microsoft/terminal/commit/470b02c70b965b92ecd0a09a56ccce9703033d0e) Fix formatting - [`1924a7e`](https://github.com/microsoft/terminal/commit/1924a7ec775a15825268fac2c1b32d19fc2b93a5) Defensive coding practices sponsored by MtnDustin ### 📊 Changes **4 files changed** (+47 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/expect/expect.txt` (+1 -18) 📝 `src/host/inputReadHandleData.cpp` (+1 -1) 📝 `src/host/readDataCooked.cpp` (+27 -11) 📝 `src/host/stream.cpp` (+18 -10) </details> ### 📄 Description #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:\> ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:40:09 +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#30330