CLI option output not consistent with other Canonical CLI utilities

Bug #1865559 reported by Tim McNamara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

Juju's help output has a different look and feel from other utilities produced by Canonical. In particular, the options (flags in Go parlance) have the following characteristics:

- no indent at the start of the line
- description is on the next line
- defaults appear next to the option, rather than after the usage instructions

Some examples:

$ juju help sla
[..,]

Global Options:
--debug (= false)
    equivalent to --show-log --logging-config=<root>=DEBUG
-h, --help (= false)
    Show help on a command or other topic.
--logging-config (= "")
    specify log levels for modules
--quiet (= false)
    show no informational output
--show-log (= false)
    if set, write the log file to stderr
--verbose (= false)
    show more verbose output

Command Options:
-B, --no-browser-login (= false)
    Do not use web browser for authentication
--budget (= "")
    the maximum spend for the model
--format (= tabular)
    Specify output format (json|tabular|yaml)
-m, --model (= "")
    Model to operate in. Accepts [<controller name>:]<model name>|<model UUID>
-o, --output (= "")
    Specify an output file

$ multipass help info
[...]

Options:
  -h, --help Display this help
  -v, --verbose Increase logging verbosity, repeat up to three times for
                     more detail
  --all Display info for all instances
  --format <format> Output info in the requested format.
                     Valid formats are: table (default), json, csv and yaml

LXC vertically aligns the long option forms of every command, even those without a short form. This provides the impression that each option is widely indented. Unlike the other commands, it uses the term flag rather than option.

$ lxc help info
[...]
Flags:
      --resources Show the resources available to the server
      --show-log Show the instance's last 100 log lines?
      --target Cluster member name

Global Flags:
      --debug Show all debug messages
      --force-local Force using the local unix socket
  -h, --help Print help
      --project string Override the source project
  -q, --quiet Don't show progress information
  -v, --verbose Show all information messages
      --version Print version number

$ snapcraft help login
[...]

Options:
  --with <login file> Path to file created with 'snapcraft export-login'
  -h, --help Show this message and exit.

The snap command is slightly different, using a leading tab and square brackets for its section headers, but retains the usage on the same line.

$ snap help find
[...]

[find command options]
      --private Search private snaps.
      --narrow Only search for snaps in “stable”.
      --section= Restrict the search to a given section.
      --color=[auto|never|always] Use a little bit of colour to highlight some things. (default: auto)
      --unicode=[auto|never|always] Use a little bit of Unicode to improve legibility. (default: auto)

Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.