| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Also:
- Added isort to Pipenv dev
- Added setup.cfg to make it easy to run flake8, doc8, and isort directly from the command line without using invoke
- Ran isort to sort includes
|
|
|
|
| |
this is no longer needed
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
cmd2.Cmd.cmdloop() now returns self.exit_code which should be an integer
Also:
- Refactored examples to call sys.exit(app.cmdloop()) in their __main__
- Running transcript tests now sets the exit_code accordingly based on success/failure
- Updated CHANGELOG
- Updated README
- Updated Sphinx docs
- Added unit test for case when transcript test fails
|
|
|
|
| |
argparse
|
|
|
|
| |
sub-command specific help lookup.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
sub-commands
Added hint suppression on a per-parameter basis
Added helper function to force an parameter to fall back to bash completion instead of using Cmd2 completion.
- Hinting is still enabled by default but can be suppressed in the helper function.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Added some shared definitions to cmd2/__init__.py -> maybe there's a better place for these?
Figured out how to trick bash into showing argument hints. It's a bit weird.
Updated all of the tests and examples to import cmd2 resources from their new location without the automatic imports in cmd2/__init__.py
For #369
|
| |
|
|
|
|
| |
AutoCompleter by default.
|
|
|
|
| |
all tests are passing yet.
|
|
|
|
|
|
|
| |
Removed all dependency on six other than for six.moves.input
Also:
- Started removing code branches which were for Python 2 support
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Added a default signal handler for SIGINT that does the following:
- Terminates a pipe process if one exists
- Raises a KeyboardInterrupt for other parts othe code to catch
Also:
- Changed the default value for quit_on_sigint to False
- Modified the way the subcommand functions are called in subcommand.py (unrelated to rest of commit)
|
|
|
|
|
|
| |
functools.partialmethod() was added in Python 3.4, so it can't be used in Python 2.7.
- Modified the code to skip trying to use it for Python 2.7
- Skip the two unit tests which test its usage on Python 2.7
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Also:
- Reanamed foo and bar subcommand methods to base_foo and base_bar
|
| |
|
| |
|
| |
|
|
Modified the do_help() method to behave differently for methods which have been decorated with an argparse ArgumentParser.
This is so that help will properly deal with sub-command help.
Suppose you have a base command "base" which has two sub-commands, "foo" and "bar". Then "help base" will provide very different help text than "help base foo".
Slightly tweaked the two argparse decorators to set an attribute in the decorated function's dictionary so that the do_help method can know which functions have an ArgumentParser and which do not.
Added a "subcommands.py" example for demonstrating how to create and use subcommands based on argparse and the cmd2 @with_argument_parser decorator.
|