Skip to content

Improve CLI help messages

By using argparse, some of the incorrect cli usages are better warned, here are some examples:

  • xfce4-panel-profiles save
    • Before: IndexError('list index out of range')
    • After: error: the following arguments are required: filename
  • xfce4-panel-profiles load foo bar
    • Before: Tries to load foo and ignores bar
    • After: error: unrecognized arguments: bar
  • xfce4-panel-profiles load --help
    • Before: Tries to open --help
    • After: usage: load [-h] filename (you can still do load -- --help)

This also mentions the --version option in --help.

Merge request reports