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

Follow CLI best practice for projectormake #188

Open
zwetan opened this issue Oct 8, 2020 · 0 comments
Open

Follow CLI best practice for projectormake #188

zwetan opened this issue Oct 8, 2020 · 0 comments
Labels
projectormake Utility to build projectors

Comments

@zwetan
Copy link
Member

zwetan commented Oct 8, 2020

  • from package C.unistd, use getopt() and/or getopt_long()

  • use command-line standard arguments

    • -h / --help current tool help
    • -v / --version current tool version
    • -i / --info current tool informations
      • show the runtime version
      • show other libraries version
      • show license, credits, etc.
      • show many urls (download, issues, etc.)
    • -V / --verbose enable verbose output
    • etc.
  • always exit with 0 for success, or 1 for failure

    • more exit status code can be supported, see documentation
  • supports NO_COLOR env var
    see: https://no-color.org/

    All command-line software which outputs text with ANSI color added
    should check for the presence of a NO_COLOR environment variable that,
    when present (regardless of its value), prevents the addition of ANSI color.

  • supports NO_EMOJI env var
    same as NO_COLOR but for preventing the use of emoji chars
    for example: use @ instead of 🌀

  • support configuration settings and precedence of options
    order of loading should always be

    1. program defaults
      for ex: the App.config property
    2. Global configuration file
      this is a system-wide shared by all users config file
    3. Local configuration file
      this is per user config file that the program only load it if it exists
    4. Environment variables
      a. user env vars
      b. system env vars
    5. Command line parameters
@zwetan zwetan added the projectormake Utility to build projectors label Oct 8, 2020
@zwetan zwetan added this to To do in projectormake via automation Oct 8, 2020
@zwetan zwetan moved this from To do to In progress in projectormake Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
projectormake Utility to build projectors
Projects
projectormake
In progress
Development

No branches or pull requests

1 participant