Files
ChaosCrypt/chaoscrypt/tests
dvs 24a36d6fb4 cli: accept --json and --quiet in either position
The global output flags were only registered on the top-level parser, so
`chaoscrypt info -k my.key -P keypwd --json` failed with "unrecognized
arguments: --json". That is the form most people type first, since the flag
reads naturally at the end of a command.

Both flags are now also registered on every subcommand. They write to
separate destinations (json_local / quiet_local) because argparse would
otherwise let an unset subcommand flag overwrite an explicitly set global
one; the two are merged in main().

Three regression tests cover the flag in both positions plus the bare
ciphertext output when neither flag is given.
2026-09-27 17:07:13 +08:00
..