summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Added more command validation. Moved some common behavior into private ↵Eric Lin2020-08-041-9/+51
| | | | functions.
* Added explicit tests for dir and setattr. Minor type hinting changesEric Lin2020-08-041-0/+24
|
* Fixes issue with locating help_ annd complete_ functions when autoloading ↵Eric Lin2020-08-041-10/+136
| | | | | | command functions Adds handling of some edge cases. More thorough test coverage.
* add ability to remove commands and commandsetsEric Lin2020-08-042-3/+94
| | | | Issue #943
* Added new constructor parameter to flag whether commands should autoload. ↵Eric Lin2020-08-041-0/+86
| | | | | | Added unit tests. Moved installing commands into separate functions that can be called Issue #943
* Some minor cleanup of how imports work. Fixed issue with help documentation ↵Eric Lin2020-08-041-3/+9
| | | | | | for CommandSet commands. Issue #943
* Merge branch 'master' into hint_bugKevin Van Brunt2020-06-012-1/+69
|\
| * Removed pwarning() calls when command raises SystemExitKevin Van Brunt2020-05-282-1/+54
| | | | | | | | Added unit tests
| * Added SkipPostcommandHooks exception and made Cmd2ArgparseError inherit from it.Kevin Van Brunt2020-05-071-0/+15
| | | | | | | | Both exception classes have been added to the public API.
* | Changed how SimpleTable creates divider when divider_char is wide. It no ↵Kevin Van Brunt2020-06-011-28/+57
| | | | | | | | longer stretches the width of the table.
* | Added unit tests for base_width()Kevin Van Brunt2020-05-281-3/+54
| |
* | Updated argparse_completer to use TableCreator for the hint tableKevin Van Brunt2020-05-281-42/+52
|/
* Added info on semantic versioning and branching strategy to CONTRIBUTING.mdTodd Leonhardt2020-04-2413-21/+48
| | | | | | | Also: - Added isort to Pipenv dev - Added setup.cfg to make it easy to run flake8, doc8, and isort directly from the command line without using invoke - Ran isort to sort includes
* Updated _set_parser_prog() so future calls to add_parser() will set the ↵Kevin Van Brunt2020-04-231-1/+8
| | | | | | correct prog value This makes dynamically adding subcommands after the CLI starts easier.
* Fixed issue where subcommand usage text could contain a subcommand alias ↵Kevin Van Brunt2020-04-231-10/+52
| | | | instead of the actual name
* Fix unit test which made incorrect assumption that vi editor would exist on ↵Todd Leonhardt2020-04-231-8/+3
| | | | all Linux systems
* Merge branch 'master' into table_creatorKevin Van Brunt2020-04-221-5/+32
|\
| * Added unit tests for wrappers passing kwargs to command functionsKevin Van Brunt2020-04-211-5/+32
| |
* | Added unit tests for paddingKevin Van Brunt2020-04-221-0/+31
| |
* | Merge branch 'master' into table_creatorKevin Van Brunt2020-04-221-1/+1
|\ \ | |/
| * Updated error textKevin Van Brunt2020-04-201-1/+1
| |
| * cmd2 now considers ipy a pyscript environmentKevin Van Brunt2020-04-201-1/+1
| |
* | Merge branch 'master' into table_creatorTodd Leonhardt2020-04-151-26/+8
|\ \ | |/
| * Simplfied _redirect_output() by raising exception instead of returning boolKevin Van Brunt2020-04-111-26/+8
| |
* | Merge branch 'master' into table_creatorKevin Van Brunt2020-04-112-1/+17
|\ \ | |/
| * Fixed unit test nameKevin Van Brunt2020-04-111-1/+1
| |
| * Made some optional arguments with defaults keyword-only.Kevin Van Brunt2020-04-112-1/+17
| | | | | | | | | | Added unit test for echo argument to pyscript app() command. Removed _relative_load from hidden commands since that command was renamed.
* | Initial commit of table creation APIKevin Van Brunt2020-04-094-14/+427
|/
* Add unit tests for Ctrl-C stopping scripts/transcriptsKevin Van Brunt2020-03-262-0/+31
|
* do_shell() now saves the return code of the command it runs in ↵Kevin Van Brunt2020-03-201-0/+4
| | | | self.last_result for use in pyscripts
* Fixed docstringKevin Van Brunt2020-03-121-1/+1
|
* Added unit test for Cmd2ArgparseErrorKevin Van Brunt2020-03-121-1/+38
|
* Added Cmd2ShlexErrorKevin Van Brunt2020-03-121-2/+2
|
* Moved custom cmd2 exceptions to a separate file and removed them from public APITodd Leonhardt2020-02-183-8/+8
|
* Added apply_style to CompletionErrorKevin Van Brunt2020-02-181-39/+0
| | | | Simplified error class structure in argparse_completer.py
* Fixed issue where argparse completion errors were being rewrapped as ↵Kevin Van Brunt2020-02-181-1/+41
| | | | _ActionCompletionError in some cases
* Updated unit testKevin Van Brunt2020-02-171-2/+5
|
* Made CompletionError exception available to non-argparse tab completionKevin Van Brunt2020-02-171-2/+2
|
* Renamed AutoCompleter to ArgparseCompleter for clarityKevin Van Brunt2020-02-171-12/+12
|
* Only tab complete after redirection tokens if redirection is allowedKevin Van Brunt2020-02-171-28/+32
|
* Updated documentation and testsKevin Van Brunt2020-02-171-1/+8
|
* Fixed bug where pyscripts could edit cmd2.Cmd.py_locals dictionary.Kevin Van Brunt2020-02-146-19/+34
| | | | | | | | | Fixed bug where cmd2 set sys.path[0] for a pyscript to its cwd instead of the script's directory. Fixed bug where sys.path was not being restored after a pyscript ran. Setting the following pyscript variables: __name__: __main__ __file__: script path (as typed) Removed do_py.run() function since it didn't handle arguments and offered no benefit over run_pyscript.
* Removed dash from 'tab complete' stringKevin Van Brunt2020-02-132-8/+8
|
* Allowing for colored fill char in align_textKevin Van Brunt2020-02-111-1/+10
| | | | Added function to index all style sequences found in a string
* Fixed bug where ANSI style sequences were not correctly handled in ↵Kevin Van Brunt2020-02-111-6/+37
| | | | utils.truncate_line()
* Renamed set command's -l/--long flag to -v/--verbose for consistency with ↵Kevin Van Brunt2020-02-101-2/+2
| | | | help and history commands
* Corrected issue where the actual new value was not always being printed in ↵Kevin Van Brunt2020-02-101-8/+11
| | | | | | | | do_set. Fixed do_set unit test. Made allow_ansi setter error message consistent with str_to_bool. Updated a docstring
* Added unit test for ColorBase.colors()Kevin Van Brunt2020-02-071-0/+7
|
* Added __str__() back to ColorBase for more flexibility in its usageKevin Van Brunt2020-02-071-6/+18
| | | | Updated documentation and added unit tests
* Removed unnecessary methods from fg and bg color enumsTodd Leonhardt2020-02-071-12/+6
|