[PR #13706] [MERGED] Fixe arg parsing when one-character argument is followed by ; #29725

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13706
Author: @serd2011
Created: 8/9/2022
Status: Merged
Merged: 8/12/2022
Merged by: @undefined

Base: mainHead: fix13277


📝 Commits (2)

📊 Changes

2 files changed (+20 additions, -1 deletions)

View changed files

📝 src/cascadia/LocalTests_TerminalApp/CommandlineTest.cpp (+15 -0)
📝 src/cascadia/TerminalApp/AppCommandlineArgs.cpp (+5 -1)

📄 Description

Summary of the Pull Request

Changes the way _addCommandsForArg determines if the delimiter was at the beginning of the argument so that it accounts for the fact that match includes the last character of the string before it.

PR Checklist

Validation Steps Performed

wt -p "u"; nt -p "u" does not cause an error


🔄 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/13706 **Author:** [@serd2011](https://github.com/serd2011) **Created:** 8/9/2022 **Status:** ✅ Merged **Merged:** 8/12/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `fix13277` --- ### 📝 Commits (2) - [`8b154e3`](https://github.com/microsoft/terminal/commit/8b154e349fd977ef5829358b335b4cb430bca396) seems to work - [`8bc658c`](https://github.com/microsoft/terminal/commit/8bc658cf36507a84a275747327e20222531c7a50) added a test ### 📊 Changes **2 files changed** (+20 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/LocalTests_TerminalApp/CommandlineTest.cpp` (+15 -0) 📝 `src/cascadia/TerminalApp/AppCommandlineArgs.cpp` (+5 -1) </details> ### 📄 Description ## Summary of the Pull Request Changes the way `_addCommandsForArg` determines if the delimiter was at the beginning of the argument so that it accounts for the fact that match includes the last character of the string before it. ## PR Checklist * [x] Closes #13277 ## Validation Steps Performed `wt -p "u"; nt -p "u"` does not cause an error --- <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:36:32 +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#29725