| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Start deprecation of Python 3.6
* Removed dependency on attrs and replaced with dataclasses
* Fix typing
* Added comments to assist with dropping support of Python versions in the future.
---------
Co-authored-by: Kevin Van Brunt <kmvanbrunt@gmail.com>
|
|
|
|
| |
argparse decorator to automatically strip annotations.
|
| |
|
|
|
|
|
| |
Not necessary for the sake of the example, but might help some curious
individuals get a better feel for how the system works.
|
|
|
|
|
|
|
|
|
| |
Previously redirection information was lost by the postparsing hooks
add_whitespace_hook() and downcase_hook(). This was fine for this simple
shell, but sets a bad example for more complicated use cases.
To fix this, when parsing the new Statement object, include the
`post_command` attribute from the original Statement.
|
| |
|
|
|
|
| |
AlternatingTables
|
|
|
|
|
|
| |
Renamed Column settings:
override_header_style -> style_header_text
override_data_style -> style_data_text
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cmd2.EightBitBg classes.
Added support for 24-bit/RGB colors with the cmd2.RgbFg and cmd2.RgbBg classes.
Removed dependency on colorama.
Deprecated cmd2.fg. Use cmd2.Fg instead.
Deprecated cmd2.bg. Use cmd2.Bg instead.
Changed type of ansi.allow_style from a string to an ansi.AllowStyle Enum class.
Fixed bug where using choices on a Settable didn't verify that a valid choice had been entered.
|
| |
|
|
|
|
|
|
| |
using methods on ArgumentParser objects.
This fixes issue where subcommands did not use the correct custom ArgparseCompleter type.
|
| |
|
|
|
|
|
|
|
|
|
| |
extend and modify the
behavior of `ArgparseCompleter`.
* New function `register_argparse_argument_parameter()` allows developers to specify custom
parameters to be passed to the argparse parser's `add_argument()` method. These parameters will
become accessible in the resulting argparse Action object when modifying `ArgparseCompleter` behavior.
|
| |
|
|
|
|
|
|
| |
argparse.ArgumentParser.
This is best practice for consistency of appearance between built-in and custom commands.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Added include_py keyword parameter to cmd2.Cmd.__init__(). If False, then the py command will not be available.
Removed ability to run Python commands from the command line with py.
Made banners and exit messages of Python and IPython consistent.
Changed utils.is_text_file() to raise OSError if file cannot be read.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
# Conflicts:
# cmd2/__init__.py
# cmd2/argparse_completer.py
# cmd2/argparse_custom.py
# cmd2/cmd2.py
# cmd2/decorators.py
# cmd2/exceptions.py
# cmd2/utils.py
# examples/arg_decorators.py
# examples/argparse_completion.py
# examples/modular_commands_main.py
# tests/test_argparse_completer.py
# tests/test_argparse_custom.py
# tests/test_cmd2.py
# tests/test_completion.py
# tests/test_history.py
|
| |\ |
|
| |\ \ |
|
| |\ \ \ |
|
| | |\ \ \ |
|
| |\ \ \ \ \
| | |/ / / / |
|
| | |\ \ \ \ |
|
| | | | | | | |
|
| |/ / / / / |
|
| |\ \ \ \ \ |
|
| |\ \ \ \ \ \ |
|
| |\ \ \ \ \ \ \ |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Replaced completer_function / completer_method with completer.
ArgparseCompleter now always passes cmd2.Cmd or CommandSet instance as the self
argument to choices_provider and completer functions.
Moved basic_complete from utils into cmd2.Cmd class.
Moved CompletionError to exceptions.py
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| |_|_|_|_|_|_|/
|/| | | | | | | |
|
| |_|_|_|_|_|/
|/| | | | | |
| | | | | | |
| | | | | | | |
minor import changes.
|
| |_|_|_|_|/
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
subclasses will inherit the parent class's default category.
Adds optional flag to disable heritability.
|
| |_|_|_|/
|/| | | |
| | | | |
| | | | | |
Fixed issue where flag names weren't always sorted correctly in argparse tab completion
|
| | | | | |
|
| |_|_|/
|/| | | |
|
| |_|/
|/| |
| | |
| | |
| | |
| | | |
display help when called with -h/--help.
'add_help=False' no longer has to be passed to parsers used in @as_subcommand_to decorator.
|
| |/
|/|
| |
| |
| |
| |
| | |
are now
Cmd2AttributeWrapper objects named cmd2_statement and cmd2_handler. This makes it
easy to filter out which attributes in an argparse.Namespace were added by cmd2.
|
|/
|
|
|
|
| |
attribute cmd2 was adding
Added get_statement() function to argparse.Namespace which returns __statement__ attribute
|
|
|
|
|
|
| |
CommandSet command functions (do_, complete_, help_).
Renamed install_command_set and uninstall_command_set to
register_command_set and unregister_command_set.
|
| |
|