Quote args containing spaces in ArgsStringOrList#195
Merged
tartarughina merged 2 commits intozed-extensions:mainfrom Feb 21, 2026
Merged
Quote args containing spaces in ArgsStringOrList#195tartarughina merged 2 commits intozed-extensions:mainfrom
tartarughina merged 2 commits intozed-extensions:mainfrom
Conversation
When ArgsStringOrList::List elements contain spaces, they are now wrapped in double quotes before joining. This prevents the debugger from splitting paths with spaces into multiple arguments. Add tests covering list with spaces, list without spaces, single element with spaces, empty list, and single string passthrough.
playdohface
approved these changes
Feb 21, 2026
Collaborator
playdohface
left a comment
There was a problem hiding this comment.
Take my comment as food for thought, but if people actually allow tabs in their file paths they brought it unto themselves imo.
Comment on lines
+436
to
+438
| if s.contains(' ') { | ||
| format!("\"{}\"", s) | ||
| } else { |
Collaborator
There was a problem hiding this comment.
My gut says why not just wrap it in quotes unconditionally, but I remember there was a gotcha there. And, I know this would be madness, but can paths technically contain tabs? Like, is the contains(' ') check exhaustive here?
Collaborator
Author
|
I hope to never see a tab in a file path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Address #194
When ArgsStringOrList::List elements contain spaces, they are now wrapped in double quotes before joining. This prevents the debugger from splitting paths with spaces into multiple arguments.
Add tests covering list with spaces, list without spaces, single element with spaces, empty list, and single string passthrough.
Tested with debug entry
and verified that the provided args with spaces are treated as a single string