summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Fixing unit testsKevin Van Brunt2019-07-041-4/+2
|
* Whitespace and doc fixesKevin Van Brunt2019-07-011-1/+1
|
* Fixed a couple example transcripts that didn't get updated when colors got ↵Todd Leonhardt2019-06-292-2/+2
| | | | renamed to allow_ansi
* Updated color examples to support bold and underline optionsTodd Leonhardt2019-06-282-2/+6
|
* Improve background color display of prompt in async_printing.py exampleTodd Leonhardt2019-06-281-1/+1
|
* Simplified ansi color dictionaries and lookup methodsTodd Leonhardt2019-06-275-163/+47
| | | | | | | Also: - Updated examples that use color to use cmd2.ansi instead of colorama - Updated tests that use color to use cmd2.ansi instead of colorama - plumbum_colorspy example shows how to override color lookup functions to use a different color library
* Changed signature of style() to allow for simpler calling and overriding of ↵Kevin Van Brunt2019-06-261-1/+1
| | | | settings in a provided TextStyle
* Added TextStyle class and default implementations for various message types ↵Kevin Van Brunt2019-06-261-1/+2
| | | | like Warning, Error, and Succes
* Moved code related to ANSI escape codes to new file called ansi.pyKevin Van Brunt2019-06-261-2/+1
|
* Renamed style_message to styleKevin Van Brunt2019-06-261-1/+1
|
* Removed color args from poutput since the style function is going to do more ↵Kevin Van Brunt2019-06-251-14/+2
| | | | than color
* Replaced more pexcept uses with perrorKevin Van Brunt2019-06-252-8/+8
|
* Initial Commit for Issue 698xNinjaKittyx2019-06-243-10/+9
|
* Made tokens_for_completion() method public since a couple of our examples use itTodd Leonhardt2019-06-231-3/+3
|
* Made last_result public and restored the initialization of it in __init__ ↵Todd Leonhardt2019-06-232-6/+6
| | | | and associated comment
* Restored a few attributes to be publicTodd Leonhardt2019-06-231-5/+5
|
* Fixed a bunch of examples which were broken due to moving DEFAULT_SHORTCUTS ↵Todd Leonhardt2019-06-167-7/+7
| | | | from cmd2.py to constants.py
* Began work to minimize public APITodd Leonhardt2019-06-153-11/+11
|
* Updated commentKevin Van Brunt2019-06-151-4/+4
|
* Updated various documentation and tests to not use loadTodd Leonhardt2019-06-152-6/+6
|
* Fix unit test failures I introduced in last commitTodd Leonhardt2019-06-151-2/+2
|
* Updated documentationKevin Van Brunt2019-06-154-7/+7
|
* Updated commentKevin Van Brunt2019-06-151-1/+1
|
* Merge branch 'master' into history_fixesKevin Van Brunt2019-06-147-13/+4
|\
| * Removed support for cmd.cmdqueueKevin Van Brunt2019-06-113-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 Brunt2019-06-072-6/+0
| | | | | | | | year
| * Transcript testing now properly handles commands which signal the ↵Todd Leonhardt2019-06-062-0/+2
| | | | | | | | | | | | application to quit Implemented an antediluvian TODO
* | Fix history display issuesTodd Leonhardt2019-06-131-1/+2
|/ | | | | | | | | | | Issues were two fold: - HistoryItem statement.raw was getting mangled for multiline commands due to macro-related changes in _input_line_to_statement() - HistoryItem pretty printing wasn't using rstrip() anymore in verbose mode I added a couple unit tests in the process of getting here. But we should add some explicit unit tests of _input_line_to_statement() for cases like: - basic single-line command - macro single-line command - multiline command
* Changed example cmd2 history file's extension from txt to dat since it is ↵Kevin Van Brunt2019-06-051-1/+1
| | | | now binary
* Refactor exit_code implementationTodd Leonhardt2019-05-2023-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 coverageKevin Van Brunt2019-05-072-2/+2
|
* Fixed issue when printing alerts caused by a prompt with a new line characterKevin Van Brunt2019-03-211-4/+4
|
* Merge branch 'master' into attributesTodd Leonhardt2019-03-171-5/+11
|\
| * Updated docs and exampleKevin Van Brunt2019-03-171-5/+11
| |
* | Converted class attributes which aren't intended to be dynamically settable ↵Todd Leonhardt2019-03-141-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 attributesTodd Leonhardt2019-03-141-1/+4
|\ \ | |/
| * Updated documentationKevin Van Brunt2019-03-141-1/+4
| |
* | Fixed how shortcuts are set in examplesTodd Leonhardt2019-03-148-42/+30
| |
* | First stage of attribute refactoringTodd Leonhardt2019-03-137-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 commandsKevin Van Brunt2019-03-101-0/+12
|
* Fixed typo in exampleKevin Van Brunt2019-03-101-1/+1
|
* Fix for when with_argument_list is called with preserve_quotes optional argumentTodd Leonhardt2019-03-041-0/+5
|
* Updated the examples to illustrate sorting CompletionItemsKevin Van Brunt2019-02-272-4/+10
|
* Made cmd2_app a positional and required argument of AutoCompleter.Kevin Van Brunt2019-02-232-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 Brunt2019-02-207-14/+25
| | | | calling init()
* Fixed examplesKevin Van Brunt2019-02-082-3/+3
|
* Fixed issue where calling exit() or quit() from a pyscript would close the ↵Kevin Van Brunt2019-02-061-2/+2
| | | | whole console
* Fixed commentKevin Van Brunt2019-02-061-1/+1
|
* Added help summary and a separate label for commands and topicsKevin Van Brunt2018-12-211-12/+33
|
* Removed newlinesKevin Van Brunt2018-12-211-3/+1
|