Windows: `rtk tree` still corrupts arguments containing a quote — last unconverted sibling after #3728
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 81.1k
- Forks
- 5.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 35
Description
src/cmds/system/tree.rs:35 forwards rtk's own CLI arguments to a PATH-resolved tree with plain cmd.arg:
for arg in args {
cmd.arg(arg);
}
#3728 introduced ChildArgExt::child_arg/child_args and converted the rest of this family — ls, wc, find, grep/rg, proxy, run_passthrough and the main.rs unknown-command fallback — but tree was not converted. MSYS2 ships an MSYS-linked tree, so on Windows this reproduces #3727 exactly:
rtk tree -P '*"*'
rtk tree -I 'a"b'
The -I pattern built on line 32 from NOISE_DIRS is rtk-generated and contains no quote, so it is unaffected.
Fix is mechanical — swap the loop for cmd.child_args(args), matching wc_cmd.rs.
I checked the rest of src/cmds/system/ while reviewing #3728: read.rs's Command::new sites are all inside #[cfg(test)], pipe_cmd.rs spawns nothing, and ast_grep/ctest target native binaries. tree.rs is the only remaining gap in this family.
Follow-up from the review of #3728.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/cmds/system/tree.rs:35 and compare its argument loop with the child_args usage in wc_cmd.rs. Convert tree's forwarded arguments consistently, then verify the quoted -P and -I examples on Windows/MSYS2 no longer corrupt their arguments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100