Repository navigation
Description
Two flags the docs present as global. One does not exist; the other exists but is wired to two commands.
Provenance: AI-assisted source audit, human-directed, at v0.44.2 (700bdde). Reproduced with the shipped binary; outputs verbatim.
1. -u does not exist
README.md:293 lists -u, --ultra-compact. docs/contributing/ARCHITECTURE.md:772 has a section "Ultra-Compact Mode (-u)", and :1031/:1055 say "Global Flags: -v and -u work across all commands".
$ rtk -u git log
rtk: Failed to resolve '-u' via PATH, falling back to direct exec: Binary '-u' not found on PATH
[rtk: program not found]
rtk --help lists no -u in its Options. The long form --ultra-compact does parse — there is even a test named test_ultra_compact_long_form_still_works (main.rs:3558), which reads like the short form was removed deliberately and the docs were not updated.
Worth noting the failure mode: an unknown leading flag is treated as a program name and passed to the resolver, so rtk -u <anything> reports "program not found" rather than "unknown flag". That is a confusing error for a typo'd flag generally, not just this one.
2. --ultra-compact is documented as applying to everything, but only gh/glab read it
docs/guide/resources/what-rtk-covers.md:134 says these flags "apply to all RTK commands and can push the bash output reduction even higher", with the example rtk git log --ultra-compact at :143.
$ rtk git log > plain.txt
$ rtk git log --ultra-compact > uc.txt
$ diff plain.txt uc.txt
$ # no output — identical
grep -rln ultra_compact src/ returns main.rs, cmds/git/gh_cmd.rs, cmds/git/glab_cmd.rs — and in main.rs the value is only forwarded at :1788 (gh_cmd::run), :1807 (glab_cmd::run) and :3442. For every other command the flag is accepted and ignored.
The documented example is git log, which is one of the commands it does nothing for.
A note on how I checked
My first measurement compared byte counts and showed a 3-byte difference, which looked like the flag was doing something small. It was not — the two runs had different commit hashes. diff shows the outputs are identical. Byte-count comparison is not sufficient here; I mention it in case anyone else measures it the same way.
Suggested fix (untested)
Either drop -u from README.md:293 and ARCHITECTURE.md:772,1031,1055, or restore the short form. For --ultra-compact, either scope the documentation to gh/glab or wire it through the other filters.
Separately, an unknown leading flag being routed to the binary resolver produces a misleading message; rejecting arguments that start with - before the PATH lookup would give "unknown flag" instead.
Related, same sweep
docs/guide/resources/what-rtk-covers.md:139,146documents-v/-vv/-vvvas showing "filtering details on stderr", with the examplertk git status -vvv. That placement is silently ignored (help says verbosity is only recognised before the subcommand), and even correctly placed,rtk -vvv git status 2>errproduced 0 bytes on stderr;rtk -vvv git logproduced 16 bytes (Git log output:). Nothing prints the "raw output before filtering" thatARCHITECTURE.md:752-760describes.docs/guide/getting-started/configuration.md:12-15lists config-file locations for Linux and macOS only, whileREADME.md:346claims rtk "works fully on native Windows". On Windows the path is%APPDATA%\rtk\config.toml(dirs::config_dir()), which no doc gives.docs/guide/resources/troubleshooting.md:49showsrtk init --global --cursor;rtk init --helphas no--cursorflag (Cursor is reachable as--agent cursor).
Activity
pszymkowiak commentedon Aug 4, 2026
🔍 Automated Triage
docslowSummary
Multiple docs describe a nonexistent
-ushort flag and overstate--ultra-compactas global when it only affects gh/glab; recommend correcting README.md, ARCHITECTURE.md, and what-rtk-covers.md accordingly.📁 Relevant files
README.mddocs/contributing/ARCHITECTURE.mddocs/guide/resources/what-rtk-covers.mddocs/guide/getting-started/configuration.mddocs/guide/resources/troubleshooting.mdsrc/main.rsTriaged automatically by wshm · This is an automated analysis, not a human review.
KuSh commentedon Sep 26, 2026
The behavioural half of the note in section 1 — "an unknown leading flag is treated as a program name … a confusing error for a typo'd flag generally" — is broader than unknown flags: a known global flag in front of a subcommand also defeats
run_fallback, because it decides fromargs[0]andargsisenv::args().skip(1).Two checks in
src/main.rs::run_fallbackreadargs[0]as the subcommand:core::constants::RTK_META_COMMANDS.contains(&args[0].as_str())— the guard that keeps meta-commands from falling through to raw executionargs[0] == "test" && args.iter().any(|a| a == "--shell" || a.starts_with("--shell="))— added by fix(cli)!: preserve argv boundaries in generic runners #4125 so a misused--shellonrtk testreports itselfMeasured on
develop(first pair) and on #4125's head (second):So the shape is not only "a flag rtk does not know becomes a program name" but "any flag before the subcommand hides the subcommand from the fallback's own checks", and the user gets exit 127 claiming command not found about a flag they typed, instead of clap's usage error.
Found while reviewing #4125, which inherits the assumption at the second site. It is not caused by that PR and did not hold it up — recording here since this issue already owns the root.
Fix shape: skip leading
--prefixed arguments before reading the subcommand, or key off the subcommand clap already identified in the errorrun_fallbackis about to re-raise. The second cannot drift from clap's own idea of where the subcommand starts. Note this is the sameargs[0]-is-positional assumption in both places, so whichever way it is fixed, both sites want it.HetCreep commentedon Oct 14, 2026
Re-checked on v1.0.0 (stable, 2026-10-13): the official release binary plus the v1.0.0 source. Provenance: AI-assisted check, human-directed. "ran" = executed against
rtk 1.0.0with a control; "read" = verified from source only.Changed (ran):
--ultra-compactwas removed in 1.0 (5d8102ab, 0 hits insrc/), andREADME.md/what-rtk-covers.mdno longer mention-u.-v ls .now prints stats.Still live at v1.0.0:
ARCHITECTURE.md:959still says "-vand-uwork across all commands";rtk -u git --versionexits 127Failed to resolve '-u' via PATH.rtk gain --badtypo-> exit 2 (clap error), butrtk -v gain --badtypo,rtk --ultra-compact gain --badtypoandrtk -vvv git --version-> exit 127.rtk -vvv git statusprints nothing to stderr whilewhat-rtk-covers.md:137-141documents verbose detail.configuration.md:14-15still lists Linux and macOS only.