summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Added code to handle -- in argparse completerKevin Van Brunt2018-10-101-1/+1
|
* Added warning to documentation about how help_foo won't be called for ↵Todd Leonhardt2018-10-062-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 Leonhardt2018-10-061-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 commentsTodd Leonhardt2018-10-061-0/+16
|
* Merge remote-tracking branch 'origin/master' into argparse_remainderEric Lin2018-10-064-28/+28
|\
| * Using sub-command instead of subcommand where possible to be consistent with ↵Kevin Van Brunt2018-10-054-28/+28
| | | | | | | | argparse
* | Fixed a few edge cases:Eric Lin2018-10-061-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 Lin2018-10-061-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 executableTodd Leonhardt2018-09-281-0/+0
|
* Updated abbreviation example to use new cmd2 function to resolve command ↵Kevin Van Brunt2018-09-281-5/+5
| | | | functions
* Addressing code review commentsKevin Van Brunt2018-09-281-1/+1
|
* Updated a couple files in the examples directory due to changes in alias commandTodd Leonhardt2018-09-272-6/+5
|
* Merged alert_printer stuff from master and resolved conflictsTodd Leonhardt2018-09-251-0/+203
|\
| * Merge branch 'master' into alert_printerKevin Van Brunt2018-09-251-0/+38
| |\
| * | Added more examples and documentationKevin Van Brunt2018-09-251-2/+8
| | |
| * | Merge branch 'master' into alert_printerTodd Leonhardt2018-09-251-1/+1
| |\ \
| * | | Made async stuff publicKevin Van Brunt2018-09-251-8/+8
| | | |
| * | | Made demo more instructiveKevin Van Brunt2018-09-231-92/+103
| | | |
| * | | Added more alerts and updated documentationKevin Van Brunt2018-09-221-12/+39
| | | |
| * | | Recreating the thread in preloop to support multiple calls of cmdloopKevin Van Brunt2018-09-221-1/+3
| | | |
| * | | Updating prompt in example appKevin Van Brunt2018-09-211-7/+43
| | | |
| * | | First version of async printing exampleKevin Van Brunt2018-09-211-0/+121
| | | |
* | | | Merge branch 'master' into colorizeTodd Leonhardt2018-09-251-0/+38
|\ \ \ \ | | |_|/ | |/| |
| * | | Merge branch 'master' into command_help_noflagKevin Van Brunt2018-09-251-1/+1
| |\ \ \ | | | |/ | | |/|
| * | | Added the the ability to format help to the AutoCompleter to support ↵Eric Lin2018-09-231-0/+38
| | |/ | |/| | | | | | | sub-command specific help lookup.
* | | Merge branch 'master' into colorizeTodd Leonhardt2018-09-251-1/+1
|\ \ \ | | |/ | |/|
| * | Removed a Python3-only comment from an example since Python 2 is no longer ↵Todd Leonhardt2018-09-251-1/+1
| |/ | | | | | | supported
* | Added optional color argument to poutput() for providing a color escape code ↵Todd Leonhardt2018-09-242-4/+20
| | | | | | | | | | | | | | | | to colorize the output with Also: - Added optional err_color and war_color arguments to perror() for providing color escape codes - Removed usage of deprecated colorize() method within the examples
* | Added plumbum_colors.py example of using plumbum.colorsTodd Leonhardt2018-09-231-0/+144
| |
* | Merge branch 'master' into colorizeTodd Leonhardt2018-09-212-6/+6
|\ \ | |/
| * Removed remaining type hints in docstringsKevin Van Brunt2018-09-212-6/+6
| |
* | Updated a couple example transcripts now that colors is no longer True/FalseTodd Leonhardt2018-09-213-6/+4
| | | | | | | | | | Also: - Minor whitespace tweaks to new colors.py example
* | cmd2.Cmd.__init__ now initializes colorama and tells it to never strip ANSI ↵Todd Leonhardt2018-09-191-5/+6
| | | | | | | | | | | | | | | | codes since cmd2 deals with that Also: - Finished editing poutput(), ppaged(), and pfeedback() methods to strip ANSI color when appropriate - Changed attr.ib() factory usage so cmd2 is compatible with older versions of attrs
* | Merge branch 'master' into colorizeTodd Leonhardt2018-09-193-2/+6
|\ \ | |/
| * Added a command which does nothing and produces no output to ↵Todd Leonhardt2018-09-141-0/+4
| | | | | | | | | | | | alias_startup.py example This is just for some manual edge cases testing.
| * Fixed a couple example transcripts which were never updated when the default ↵Todd Leonhardt2018-09-142-2/+2
| | | | | | | | for locals_in_py changed to False
* | Merged master in and resolved conflictsTodd Leonhardt2018-09-043-7/+287
|\ \ | |/ | | | | @kotfu - I hope this doesn't screw you up, but I wanted to minimize some of the merge pain that will likely be coming up soon
| * Merge branch 'master' into ac_parserTodd Leonhardt2018-08-241-0/+43
| |\
| | * Added a couple unit tests of the exit code featureTodd Leonhardt2018-08-231-4/+2
| | |
| | * Added way of returning a non-zero exit code to the shellTodd Leonhardt2018-08-231-0/+45
| | |
| * | ACHelpFormatter now inherits from argparse.RawTextHelpFormatter to make it ↵Kevin Van Brunt2018-08-241-7/+4
| |/ | | | | | | easier to format help/description text
| * Copied and reduced the tab_autocompletion example to specifically exercise ↵Eric Lin2018-08-191-0/+240
| | | | | | | | | | | | updating the argparse object during init instead of durng the class construction.
* | First pass at improved colorizingkotfu2018-08-111-0/+143
|/ | | | | - colors setting now allows Always, Terminal, Never values - poutput() and perror() honor these new settings
* Updated argparse_completer to automatically set the matches_sorted flag for ↵Eric Lin2018-08-011-5/+7
| | | | tabular results. Updated the example to demonstrate pre-sorted tabular results.
* Fix Sphinx warning due to _static directoryTodd Leonhardt2018-07-301-2/+3
| | | | | Also: - Made alias_startup.py example robust as to what directory it is launched from
* Add example and documentation for #452kotfu2018-07-291-0/+114
|
* Address feedback in PRkotfu2018-07-211-2/+2
|
* Add hook examplekotfu2018-07-211-0/+115
|
* Rows with very high population density now have foreground text color set to redTodd Leonhardt2018-06-281-10/+28
|
* Made table more readable when colored module is installedTodd Leonhardt2018-06-271-1/+1
|