Skip to content

fix(cli): show short help when run without arguments (#1359) - #1450

Merged
mr-tz merged 4 commits into
mandiant:masterfrom
drona-gyawali:fix/short-help-no-args
Oct 20, 2026
Merged

mr-tz merged 4 commits into
mandiant:masterfrom
drona-gyawali:fix/short-help-no-args

Conversation

@drona-gyawali

@drona-gyawali drona-gyawali commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1359

Running floss with no arguments dumped the full option list, overwhelming for new users, So When floss is run with no arguments, it now prints a short TLDR help and exits with code 1

Signed-off-by: Drona <dronarajgyawali@gmail.com>
@mr-tz

mr-tz commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

I like the overall idea here, thanks. Can you update the branch please?

drona-gyawali and others added 3 commits October 19, 2026 16:01
Keep the existing -h epilog unchanged and show three triage examples
(default, --summary, --interesting) when floss is run without arguments.
@mr-tz

mr-tz commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Thanks for picking this up. I pushed a commit on top to simplify the approach:

  • the short help is a single SHORT_HELP constant in floss/cli.py; the existing -h epilog stays as plain text instead of being generated from a list (this also avoids the env var column misalignment the refactor introduced)
  • examples are trimmed to three triage-oriented ones: default, --summary, --interesting
  • tests are split into a parametrized -h/--help test and a no-args test, which also checks that every short-help example appears in the full help so the two don't drift

The diff against master is now +41/-16. Let me know if anything looks off.

@drona-gyawali

Copy link
Copy Markdown
Contributor Author

Looks great! Thanks for changes :)

@mr-tz
mr-tz merged commit 99c81cc into mandiant:master Oct 20, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

floss run without args - show shorter help output

2 participants