Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Removed support for cmd.cmdqueue | Kevin Van Brunt | 2019-06-11 | 3 | -7/+2 |
| | | | | allow_cli_args is now an argument to __init__ instead of a cmd2 class member | ||||
* | Removed copyright headers from source files and updated LICENSE with current ↵ | Kevin Van Brunt | 2019-06-07 | 2 | -6/+0 |
| | | | | year | ||||
* | Transcript testing now properly handles commands which signal the ↵ | Todd Leonhardt | 2019-06-06 | 2 | -0/+2 |
| | | | | | | application to quit Implemented an antediluvian TODO | ||||
* | Changed example cmd2 history file's extension from txt to dat since it is ↵ | Kevin Van Brunt | 2019-06-05 | 1 | -1/+1 |
| | | | | now binary | ||||
* | Refactor exit_code implementation | Todd Leonhardt | 2019-05-20 | 23 | -36/+56 |
| | | | | | | | | | | | | 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 | ||||
* | Improved code coverage | Kevin Van Brunt | 2019-05-07 | 2 | -2/+2 |
| | |||||
* | Fixed issue when printing alerts caused by a prompt with a new line character | Kevin Van Brunt | 2019-03-21 | 1 | -4/+4 |
| | |||||
* | Merge branch 'master' into attributes | Todd Leonhardt | 2019-03-17 | 1 | -5/+11 |
|\ | |||||
| * | Updated docs and example | Kevin Van Brunt | 2019-03-17 | 1 | -5/+11 |
| | | |||||
* | | Converted class attributes which aren't intended to be dynamically settable ↵ | Todd Leonhardt | 2019-03-14 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to instance attributes The following are now instance attributes: - allow_cli_args - default_to_shell - quit_on_sigint The following class attribute was deleted due to lack of use: - reserved_words The following instance attribute was deleted due to lack of use: - keywords | ||||
* | | Merge branch 'master' into attributes | Todd Leonhardt | 2019-03-14 | 1 | -1/+4 |
|\ \ | |/ | |||||
| * | Updated documentation | Kevin Van Brunt | 2019-03-14 | 1 | -1/+4 |
| | | |||||
* | | Fixed how shortcuts are set in examples | Todd Leonhardt | 2019-03-14 | 8 | -42/+30 |
| | | |||||
* | | First stage of attribute refactoring | Todd Leonhardt | 2019-03-13 | 7 | -14/+8 |
|/ | | | | | | | | | | The following are now arguments to cmd2.Cmd.__init__() instead of class attributes: * allow_redirection * multiline_commands * terminators * shortcuts Added a couple read-only properties for convenience of cmd2.Cmd accessing immutable members from self.statement_parser | ||||
* | Updated examples and documentation pertaining to disabling commands | Kevin Van Brunt | 2019-03-10 | 1 | -0/+12 |
| | |||||
* | Fixed typo in example | Kevin Van Brunt | 2019-03-10 | 1 | -1/+1 |
| | |||||
* | Fix for when with_argument_list is called with preserve_quotes optional argument | Todd Leonhardt | 2019-03-04 | 1 | -0/+5 |
| | |||||
* | Updated the examples to illustrate sorting CompletionItems | Kevin Van Brunt | 2019-02-27 | 2 | -4/+10 |
| | |||||
* | Made cmd2_app a positional and required argument of AutoCompleter. | Kevin Van Brunt | 2019-02-23 | 2 | -99/+4 |
| | | | | | Deleted bash tab completion support. AutoCompleter no longer assumes CompletionItem results are sorted. | ||||
* | Changed examples to reflect that settable doesn't need to be updated before ↵ | Kevin Van Brunt | 2019-02-20 | 7 | -14/+25 |
| | | | | calling init() | ||||
* | Fixed examples | Kevin Van Brunt | 2019-02-08 | 2 | -3/+3 |
| | |||||
* | Fixed issue where calling exit() or quit() from a pyscript would close the ↵ | Kevin Van Brunt | 2019-02-06 | 1 | -2/+2 |
| | | | | whole console | ||||
* | Fixed comment | Kevin Van Brunt | 2019-02-06 | 1 | -1/+1 |
| | |||||
* | Added help summary and a separate label for commands and topics | Kevin Van Brunt | 2018-12-21 | 1 | -12/+33 |
| | |||||
* | Removed newlines | Kevin Van Brunt | 2018-12-21 | 1 | -3/+1 |
| | |||||
* | Refactored script to use app() | Kevin Van Brunt | 2018-12-21 | 1 | -32/+27 |
| | |||||
* | Updated documentation | Kevin Van Brunt | 2018-12-20 | 1 | -2/+2 |
| | |||||
* | Refactored script and made OS independent by removing rm calls | Kevin Van Brunt | 2018-12-20 | 1 | -26/+40 |
| | |||||
* | Added labels for each command help text | Kevin Van Brunt | 2018-12-20 | 1 | -2/+13 |
| | |||||
* | Fixing flake8 warning | Kevin Van Brunt | 2018-12-20 | 1 | -0/+1 |
| | |||||
* | Added new example script that saves help text to a file | Kevin Van Brunt | 2018-12-20 | 1 | -0/+67 |
| | |||||
* | Fix flake8 issues | Todd Leonhardt | 2018-12-06 | 14 | -69/+63 |
| | | | | | | | | | | | | | | | | | | | | | | This commit contains a very large number of trivial changes in order to fix flake8 errors and warnings. Predominantly these are whitespace changes. Additionally, the build for Python 3.7 on TravisCI has been tweaked to fail if there are any flake8 errors using the following commandline: * flake8 . --count --ignore=E252 --max-complexity=31 --max-line-length=127 --show-source --statistics NOTE: In the future the max cyclomatic complexity should be lowered, but some improvements need to be made first. One flake8 error is being ignored entirely: * E252 missing whitespace around parameter equals * ignored because it doesn't correctly deal with default argument values after a type hint A few flake8 errors are being selectively ignored in certain files: * C901 fuction is too complex * ignored in argparse_completer.py because the complex code is an override of argparse complexity * E302 expected 2 blank lines after ... * ignored in all unit test files for convenience * F401 module imported but unused * ignored in cmd2/__init__.py because imports are for convenience of cmd2 developers and backwards compatibility * F821 undefined name * ignored in cmd2 script files which are intended to run only within cmd2 applications via pyscript where "app" and "cmd" are defined | ||||
* | Fixed bug in example caused by a keyword argument being used with dict.get() | Kevin Van Brunt | 2018-11-30 | 1 | -1/+1 |
| | |||||
* | Undefined names: from colorama import Fore, Back | cclauss | 2018-11-18 | 1 | -0/+1 |
| | | | | | | | | | | | | | | | __Fore__ and __Back__ are used on line 128 but they are never defined or imported. That means that they are _undefined names_ which have the potential to raise NameError at runtime. [flake8](http://flake8.pycqa.org) testing of https://github.com/python-cmd2/cmd2 on Python 3.7.1 $ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__ ``` ./examples/plumbum_colors.py:127:21: F821 undefined name 'Fore' color_off = Fore.RESET + Back.RESET ^ ./examples/plumbum_colors.py:127:34: F821 undefined name 'Back' color_off = Fore.RESET + Back.RESET ^ ``` | ||||
* | Update docs with smart ANSI handling for ppaged | Ethan McCreadie | 2018-11-01 | 2 | -16/+18 |
| | |||||
* | Refactored filtering in path_complete to use a function | Kevin Van Brunt | 2018-10-26 | 1 | -1/+1 |
| | |||||
* | Added code to handle -- in argparse completer | Kevin Van Brunt | 2018-10-10 | 1 | -1/+1 |
| | |||||
* | Added warning to documentation about how help_foo won't be called for ↵ | Todd Leonhardt | 2018-10-06 | 2 | -6/+5 |
| | | | | | | | command foo if it uses an argparse decorator Also: - Renamed argparse_example.py to decorator_example.py | ||||
* | Added documentation stating that parsers passed to argparse decorators need ↵ | Todd Leonhardt | 2018-10-06 | 1 | -9/+17 |
| | | | | | | | to be unique Also: - Modified table_display.py to demonstrate a workaround | ||||
* | Moved main.py to exampels/hello_cmd2.py and added some comments | Todd Leonhardt | 2018-10-06 | 1 | -0/+16 |
| | |||||
* | Merge remote-tracking branch 'origin/master' into argparse_remainder | Eric Lin | 2018-10-06 | 4 | -28/+28 |
|\ | |||||
| * | Using sub-command instead of subcommand where possible to be consistent with ↵ | Kevin Van Brunt | 2018-10-05 | 4 | -28/+28 |
| | | | | | | | | argparse | ||||
* | | Fixed a few edge cases: | Eric Lin | 2018-10-06 | 1 | -0/+2 |
| | | | | | | | | | | | | | | | | | | - Once the argument list can match a positional and that positional is tagged with nargs=argparse.REMAINDER it will consume all tokens including flag tokens. AutoCompleter now correctly detects this case will no longer attempt to complete flag tokens - A single-character token that is a flag prefix doesn't count as a flag and is parsed as a value. AutoCompleter now correctly detects this case. | ||||
* | | Added handling of nargs=argparse.REMAINDER in both AutoCompleter and ↵ | Eric Lin | 2018-10-06 | 1 | -1/+1 |
|/ | | | | | | | | ArgparseFunctor Should correctly force all subsequent arguments to go to the REMAINDER argument once it is detected. Re-arranged the command generation in ArgparseFunctor to print flag arguments before positionals Also forces the remainder arguments to always be last. | ||||
* | Made hooks.py executable | Todd Leonhardt | 2018-09-28 | 1 | -0/+0 |
| | |||||
* | Updated abbreviation example to use new cmd2 function to resolve command ↵ | Kevin Van Brunt | 2018-09-28 | 1 | -5/+5 |
| | | | | functions | ||||
* | Addressing code review comments | Kevin Van Brunt | 2018-09-28 | 1 | -1/+1 |
| | |||||
* | Updated a couple files in the examples directory due to changes in alias command | Todd Leonhardt | 2018-09-27 | 2 | -6/+5 |
| | |||||
* | Merged alert_printer stuff from master and resolved conflicts | Todd Leonhardt | 2018-09-25 | 1 | -0/+203 |
|\ | |||||
| * | Merge branch 'master' into alert_printer | Kevin Van Brunt | 2018-09-25 | 1 | -0/+38 |
| |\ |