Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conform more to command line standards #678

Open
3 of 13 tasks
ericwb opened this issue Dec 22, 2020 · 0 comments · Fixed by #813 or #814
Open
3 of 13 tasks

Conform more to command line standards #678

ericwb opened this issue Dec 22, 2020 · 0 comments · Fixed by #813 or #814
Labels
enhancement New feature or request

Comments

@ericwb
Copy link
Member

ericwb commented Dec 22, 2020

Is your feature request related to a problem? Please describe.
A nicely written standard around command lines is available.. Bandit should strive to conform to these standards where possible.

For more info, see: https://clig.dev/

TODOs:

  • Display help text when passed no options, the -h flag, or the --help flag. Show usage with no arguments #814
  • Display a concise help text by default.
  • Provide a support path for feedback and issues. A website or GitHub link in the top-level help text is common.
  • In help text, link to the web version of the documentation.
  • In help, Lead with examples.
  • Display the most common flags and commands at the start of the help text.
  • Use formatting in your help text.
  • If the user did something wrong and you can guess what they meant, suggest it.
  • Display output as formatted JSON if --json is passed.
  • Disable color if your program is not in a terminal or the user requested it. The NO_COLOR environment variable is set, the TERM environment variable has the value dumb, the user passes the option --no-color. Respect color environment variables if set #813
  • Use a pager (e.g. less) if you are outputting a lot of text.
  • Make it effortless to submit bug reports.
  • Use standard names for flags, if there is a standard.
@ericwb ericwb added the enhancement New feature or request label Dec 22, 2020
@ericwb ericwb reopened this Feb 15, 2022
ericwb added a commit that referenced this issue Feb 17, 2022
According to command line standards [1], a command line should
do its best to honor certain environment variables requesting
whether color should be part of the standard output. Two such
vars include NO_COLOR (if set) and TERM (if set to dumb), when
set tell the CLI to disable color.

[1] https://clig.dev/#output

Partially-fixes #678

Signed-off-by: Eric Brown <browne@vmware.com>
@ericwb ericwb reopened this Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant