The -no-rc flag (added with the layered config feature, #69) is documented in README.md and AGENTS.md but does not appear in the CLI -h output.
This is because -no-rc is parsed by the early-scan path (internal/app/app.go:scanEarlyFlags) — the same mechanism that handles the retro-theme egg flags (-cga, -green, -amber). Those flags are intentionally hidden, but -no-rc is a normal, user-facing configuration flag and should be discoverable.
Current -h (excerpt):
-version
print version and exit
-width int
column width per side for -diff=side (0 = auto from terminal)
README.md:162 already lists it:
-version print version and exit
-no-rc skip loading .structalignrc files
Two reasonable options:
- Register
-no-rc with the regular flag.FlagSet alongside the other flags; remove its handling from scanEarlyFlags. It doesn't need to be early-scanned the way the egg theme flags do — RC loading happens after flag parsing today only for the egg flags' sake. (Needs a small refactor in app.Run to honor the parsed value before loadRCFiles.)
- Add a manual "Other flags:" section to the usage text that documents
-no-rc (and optionally the retro-theme eggs) without registering them with flag.FlagSet.
Option 1 is cleaner — -no-rc isn't really an easter egg. Worth checking whether anything relies on it being strippable before flag.Parse (e.g., the -- separator handling in scanEarlyFlags).
Doc-only nit: this is the first divergence between -h and the README flag block, so fixing it preserves the "README mirrors -h" invariant.
The
-no-rcflag (added with the layered config feature, #69) is documented inREADME.mdandAGENTS.mdbut does not appear in the CLI-houtput.This is because
-no-rcis parsed by the early-scan path (internal/app/app.go:scanEarlyFlags) — the same mechanism that handles the retro-theme egg flags (-cga,-green,-amber). Those flags are intentionally hidden, but-no-rcis a normal, user-facing configuration flag and should be discoverable.Current
-h(excerpt):README.md:162already lists it:Two reasonable options:
-no-rcwith the regularflag.FlagSetalongside the other flags; remove its handling fromscanEarlyFlags. It doesn't need to be early-scanned the way the egg theme flags do — RC loading happens after flag parsing today only for the egg flags' sake. (Needs a small refactor inapp.Runto honor the parsed value beforeloadRCFiles.)-no-rc(and optionally the retro-theme eggs) without registering them withflag.FlagSet.Option 1 is cleaner —
-no-rcisn't really an easter egg. Worth checking whether anything relies on it being strippable beforeflag.Parse(e.g., the--separator handling inscanEarlyFlags).Doc-only nit: this is the first divergence between
-hand the README flag block, so fixing it preserves the "README mirrors-h" invariant.