Bug
Three command modules silently drop or misroute unrecognized subcommands:
1. git stash — subcommands dropped (P0)
save, branch, clear, store fall into the default _ => case which runs git stash (push) without the subcommand.
rtk git stash save "msg" # FAILS: runs "git stash" instead of "git stash save msg"
rtk git stash branch foo # FAILS: runs "git stash" instead of "git stash branch foo"
rtk git stash clear # WRONG: runs "git stash" (push) instead of "git stash clear"
Location: src/git.rs:1288 — the _ => match arm only passes "stash" without the subcommand.
2. git branch --show-current — flag not detected (P0)
RTK injects -a when no "list flag" is detected. --show-current, --set-upstream-to, --format, --sort are not in the detection list.
rtk git branch --show-current # WRONG: lists all branches instead of showing "develop"
git branch --show-current # CORRECT: "develop"
Location: src/git.rs:1018-1028 — has_list_flag check is incomplete.
3. pip — errors on unknown subcommands (P0)
bail!() instead of passthrough for unrecognized subcommands.
rtk pip freeze # ERROR: "unsupported subcommand 'freeze'"
rtk pip download # ERROR: same
rtk pip wheel # ERROR: same
Location: src/pip_cmd.rs:28 — _ => arm uses anyhow::bail!() instead of passthrough.
Fix
- git stash: Pass unrecognized subcommands through to
git stash <sub> [args]
- git branch: Add missing flags to detection, or passthrough when specific flags like
--show-current are present
- pip: Replace
bail!() with run_passthrough() for unknown subcommands
Bug
Three command modules silently drop or misroute unrecognized subcommands:
1.
git stash— subcommands dropped (P0)save,branch,clear,storefall into the default_ =>case which runsgit stash(push) without the subcommand.Location:
src/git.rs:1288— the_ =>match arm only passes"stash"without the subcommand.2.
git branch --show-current— flag not detected (P0)RTK injects
-awhen no "list flag" is detected.--show-current,--set-upstream-to,--format,--sortare not in the detection list.Location:
src/git.rs:1018-1028—has_list_flagcheck is incomplete.3.
pip— errors on unknown subcommands (P0)bail!()instead of passthrough for unrecognized subcommands.Location:
src/pip_cmd.rs:28—_ =>arm usesanyhow::bail!()instead of passthrough.Fix
git stash <sub> [args]--show-currentare presentbail!()withrun_passthrough()for unknown subcommands