Skip to content

1.1.0 (June 6, 2020)

Compare
Choose a tag to compare
@tleonhardt tleonhardt released this 06 Jun 17:46
· 614 commits to master since this release
  • Bug Fixes
    • Fixed issue where subcommand usage text could contain a subcommand alias instead of the actual name
    • Fixed bug in ArgparseCompleter where fill_width could become negative if token_width was large
      relative to the terminal width.
  • Enhancements
    • Made ipy consistent with py in the following ways
      • ipy returns whether any of the commands run in it returned True to stop command loop
      • Cmd.in_pyscript() returns True while in ipy.
      • Starting ipy when Cmd.in_pyscript() is already True is not allowed.
    • with_argument_list, with_argparser, and with_argparser_and_unknown_args wrappers now pass
      kwargs through to their wrapped command function.
    • Added table_creator module for creating richly formatted tables. This module is in beta and subject
      to change.
    • Added the following exceptions to the public API
      • SkipPostcommandHooks - Custom exception class for when a command has a failure bad enough to skip
        post command hooks, but not bad enough to print the exception to the user.
      • Cmd2ArgparseError - A SkipPostcommandHooks exception for when a command fails to parse its arguments.
        Normally argparse raises a SystemExit exception in these cases. To avoid stopping the command
        loop, catch the SystemExit and raise this instead. If you still need to run post command hooks
        after parsing fails, just return instead of raising an exception.
    • Added explicit handling of SystemExit. If a command raises this exception, the command loop will be
      gracefully stopped.