idstack
idstack copied to clipboard
scripts/ tools handle --help and unknown arguments in different ways
Found in the documentation audit (savvides/idstack#169). docs/cli-reference.md states the current behaviour; update it with the fix.
| Tool | Behaviour | Where |
|---|---|---|
idstack-status |
Reads only $1 and ignores all other arguments, so --help or a wrong flag prints the dashboard |
scripts/idstack-status:23-26 |
idstack-doctor |
--help is an unknown argument: exit 2 |
scripts/idstack-doctor argument loop |
idstack-learnings |
--help is an unknown subcommand: usage on stderr, exit 1 |
scripts/idstack-learnings:23-24 |
idstack-learnings search |
Ignores an option that it does not know, with no message (*) shift ;;), so a wrong flag gives unfiltered results |
scripts/idstack-learnings:182 |
idstack-gen-skills |
Accepts -h/--help, but the header synopsis does not show it |
scripts/idstack-gen-skills:4,33 |
idstack-migrate |
The header does not give the exit 2 for an unknown flag or the INITIALIZED <path> line on stderr |
scripts/idstack-migrate:40,68 |
Proposed: each tool prints its usage and exits 0 on -h/--help, and exits 2 with a message on an unknown option. Add a test for each.