summaryrefslogtreecommitdiff
path: root/cmd2
Commit message (Collapse)AuthorAgeFilesLines
* Added ability to set border background color on BorderTables and ↵Kevin Van Brunt2021-11-101-37/+46
| | | | AlternatingTables
* Added type checks to ansi.style()Kevin Van Brunt2021-10-271-0/+6
|
* Updated table example.Kevin Van Brunt2021-10-261-17/+17
| | | | | | Renamed Column settings: override_header_style -> style_header_text override_data_style -> style_data_text
* Added ability to colorize all aspects of SimpleTablesKevin Van Brunt2021-10-251-15/+74
|
* Fixed regression in Cmd.select converting "Any" type argument to stringBenjamin George Roberts2021-10-251-2/+2
|
* Added ability to colorize all aspects of BorderedTables and AlternatingTables.Kevin Van Brunt2021-10-194-104/+168
| | | | Refactored utils.align_text() to print less fill_char style characters.
* Added support for 8-bit/256-colors with the cmd2.EightBitFg and ↵Kevin Van Brunt2021-10-186-233/+1024
| | | | | | | | | | | | | | 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.
* Added settings to Column class which prevent a table from overriding ↵Kevin Van Brunt2021-10-131-7/+32
| | | | | | | | | | existing styles in header and/or data text. These were added to support nesting an AlternatingTable within an AlternatingTable, but other custom table classes can also use these settings. AlternatingTable no longer applies background color to outer borders. This was done to improve appearance since the background color extended beyond the borders of the table.
* Fixed AttributeError in rl_get_prompt() when prompt is None.Kevin Van Brunt2021-10-112-26/+18
|
* Updated thread nameKevin Van Brunt2021-09-241-1/+1
|
* Updated async_alert() to account for self.prompt not matching Readline's ↵Kevin Van Brunt2021-09-142-30/+70
| | | | current prompt.
* Argparse tab completer will complete remaining flag names if there are no ↵Kevin Van Brunt2021-09-071-3/+4
| | | | more positionals to complete.
* Updating docsKevin Van Brunt2021-09-011-0/+2
|
* Added cmd2.Cmd method to determine what ArgparseCompleter type to useKevin Van Brunt2021-09-012-21/+22
|
* Added ap_completer_type arg to Cmd2ArgumentParser.__init__().Kevin Van Brunt2021-09-012-1/+12
| | | | Added unit tests for custom ArgparseCompleter
* Refactored custom ArgparseCompleter functionality so they will now be set ↵Kevin Van Brunt2021-09-016-54/+121
| | | | | | using methods on ArgumentParser objects. This fixes issue where subcommands did not use the correct custom ArgparseCompleter type.
* Added self.last_result unit tests for run_script, _relative_run_script, and ↵Kevin Van Brunt2021-08-251-0/+1
| | | | set commands.
* Fixed extra space appended to each alias by "alias list" command.Kevin Van Brunt2021-08-251-6/+8
| | | | Added self.last_result unit tests for alias, edit, eof, help, macro, quit, shortcuts, and run_pyscript commands.
* All cmd2 built-in commands now populate self.last_resultKevin Van Brunt2021-08-232-8/+67
|
* Merge branch 'master' into topic_widthKevin Van Brunt2021-08-236-46/+180
|\
| * Removed DEFAULT_ARGUMENT_PARSER and DEFAULT_COMMAND_COMPLETER from __init.py__Kevin Van Brunt2021-08-231-6/+3
| |
| * Updated documentation for setting custom parsersKevin Van Brunt2021-08-231-1/+4
| |
| * Applied black formatEric Lin2021-08-233-7/+12
| |
| * * New function `set_default_command_completer_type()` allows developer to ↵Eric Lin2021-08-236-40/+169
| | | | | | | | | | | | | | | | | | 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.
* | Updated documentationtopic_widthKevin Van Brunt2021-08-191-0/+1
| |
* | Merge branch 'master' into topic_widthKevin Van Brunt2021-08-191-25/+0
|\ \ | |/
| * Deleted set_choices_provider() and set_completer() which were deprecated in ↵Kevin Van Brunt2021-08-191-25/+0
| | | | | | | | 2.1.2
* | set command output now uses SimpleTable.Kevin Van Brunt2021-08-194-33/+64
| | | | | | | | | | | | | | Tabled tab completion now includes divider row. Tab completion results for aliases, macros, and Settables wrap long fields. SimpleTable now accepts blank for the divider character. It is identical to passing None. Removed --verbose flag from set command so the descriptions always show.
* | Updated _print_topics() to use SimpleTableKevin Van Brunt2021-08-112-40/+46
| |
* | Updated print_topics() and columnize() to account for ANSI styles and wide ↵Kevin Van Brunt2021-07-261-1/+75
|/ | | | characters
* Added accessor methods for cmd2-specific attributes to the argparse.Action ↵Kevin Van Brunt2021-07-042-60/+273
| | | | | | class. Deprecated set_choices_provider() and set_completer() functions in favor of these new methods.
* Updated all examples to use Cmd2ArgumentParser instead of ↵Kevin Van Brunt2021-06-171-2/+2
| | | | | | argparse.ArgumentParser. This is best practice for consistency of appearance between built-in and custom commands.
* Fixing tests on Python 3.10Kevin Van Brunt2021-06-171-1/+1
|
* Fixed handling of argparse's default options group name which was changed in ↵Kevin Van Brunt2021-06-172-4/+10
| | | | Python 3.10
* Updated error message when invalid persistent history file is readKevin Van Brunt2021-06-141-1/+4
|
* Sorted exception listKevin Van Brunt2021-06-141-1/+1
|
* Compressing JSON history filesKevin Van Brunt2021-06-141-9/+14
|
* Converted persistent history files from pickle to JSON formatKevin Van Brunt2021-06-143-30/+107
|
* Updated documentation. Added support for calling cmd2.Cmd.run_editor() with ↵Kevin Van Brunt2021-05-251-2/+2
| | | | no argument.
* Merge branch 'master' into make-run_editor-publicTodd Leonhardt2021-05-241-5/+10
|\
| * do_eof() now just calls the quit functionKevin Van Brunt2021-05-171-5/+10
| |
* | Make _run_editor() publicSimon J. Rowe2021-05-141-3/+3
|/
* Removed cmd2.Cmd.quit_on_sigint.Kevin Van Brunt2021-04-301-14/+7
|
* Stopping a shell command with Ctrl-C now raises a KeyboardInterrupt to ↵Kevin Van Brunt2021-04-302-15/+52
| | | | | | support stopping a text script which ran the shell command. On POSIX systems, shell commands and processes being piped to are now run in the user's preferred shell instead of /bin/sh.
* Changed default behavior of runcmds_plus_hooks() to not stop when Ctrl-C is ↵Kevin Van Brunt2021-04-301-4/+5
| | | | pressed and instead run the next command in its list.
* Added handling for OSError caused by trying to load a GNU readline shared ↵Kevin Van Brunt2021-04-281-2/+2
| | | | | | library in Python environments like PyPy which have a pure Python implementation of readline.
* Renamed silent_startup_script to silence_startup_script for clarityKevin Van Brunt2021-04-281-4/+4
|
* Made the amount of space between columns in a SimpleTable configurablecolumn_spacingKevin Van Brunt2021-04-211-11/+19
|
* Fixed typo in docstringKevin Van Brunt2021-04-211-1/+1
|
* Updated main code to use f-stringsKevin Van Brunt2021-04-138-159/+122
|