Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | Move argparse parsing of CLI args back to cmdloop() from __init__() | Todd Leonhardt | 2019-06-11 | 1 | -16/+17 | |
| | | | | | | | | This is so unit tests pass | |||||
* | | Removed support for cmd.cmdqueue | Kevin Van Brunt | 2019-06-11 | 1 | -43/+48 | |
| | | | | | | | | allow_cli_args is now an argument to __init__ instead of a cmd2 class member | |||||
* | | Updated change log and comment | Kevin Van Brunt | 2019-06-07 | 1 | -1/+1 | |
| | | ||||||
* | | Removed copyright headers from source files and updated LICENSE with current ↵ | Kevin Van Brunt | 2019-06-07 | 2 | -6/+0 | |
| | | | | | | | | year | |||||
* | | Removed self._should_quit from cmd2 and add logic to PyscriptBridge to ↵ | Kevin Van Brunt | 2019-06-07 | 2 | -14/+19 | |
| | | | | | | | | | | | | return whether a command returned True for stop. Added stop to CommandResult so pyscripts can now know the return value of a command's do_* function. | |||||
* | | Made comment more accurate | Kevin Van Brunt | 2019-06-07 | 1 | -1/+1 | |
| | | ||||||
* | | Moved a new helper function from cmd2.py to utils.py where it probably belonged | Todd Leonhardt | 2019-06-07 | 2 | -15/+17 | |
| | | ||||||
* | | Extracted duplicated code to utility function | Todd Leonhardt | 2019-06-06 | 2 | -4/+17 | |
| | | ||||||
* | | Refactored how and when transcript file glob patterns are expanded in order ↵ | Todd Leonhardt | 2019-06-06 | 2 | -13/+29 | |
| | | | | | | | | to present a better error message to user | |||||
* | | Transcript testing now properly handles commands which signal the ↵ | Todd Leonhardt | 2019-06-06 | 1 | -3/+9 | |
| | | | | | | | | | | | | application to quit Implemented an antediluvian TODO | |||||
* | | runcmds_plus_hooks now handles HistoryItems | Kevin Van Brunt | 2019-06-06 | 1 | -2/+5 | |
| | | ||||||
* | | Merge branch 'master' into script_refactor | Kevin Van Brunt | 2019-06-06 | 2 | -91/+184 | |
|\ \ | |/ | ||||||
| * | Always remove persistent history file when history is cleared since it no ↵ | Kevin Van Brunt | 2019-06-06 | 1 | -5/+6 | |
| | | | | | | | | | | | | longer is dependent on readline. Made certain paths absolute since the CWD could change between usages. | |||||
| * | Changed wrapping point of some help text | Kevin Van Brunt | 2019-06-06 | 1 | -11/+11 | |
| | | ||||||
| * | Changed wrapping point of history's help text to match all other help text ↵ | Kevin Van Brunt | 2019-06-05 | 1 | -1/+2 | |
| | | | | | | | | in cmd2 | |||||
| * | Minor rewording of a couple comments | Todd Leonhardt | 2019-05-27 | 1 | -2/+2 | |
| | | ||||||
| * | Add the -a/--all flag to the history command for showing all commands ↵ | Todd Leonhardt | 2019-05-27 | 2 | -17/+44 | |
| | | | | | | | | | | | | | | | | | | | | including those persisted from previous sessions Also: - History class has been modified to keep track of the session start index - History class span(), str_search(), and regex_search() methods now take an optional 2nd boolean parameter `include_persisted` which determines whether or not commands persisted from previous sessions should be included by default - If a start index is manually specified, then it automatically includes the full search - Updates unit tests | |||||
| * | Fix a bug discovered during manual testing | Todd Leonhardt | 2019-05-27 | 1 | -1/+2 | |
| | | | | | | | | I found that at least with certain versions of Python and OSes, if I had a previous text-based readline history, an unhandled UnpicklingError exception could occur. So now we catch that and several other possible errors which can theoretically occur during unpickling and just move on with an empty history. The old file will get overwritten with one in the new format when the application exits. | |||||
| * | Improve unit test coverage for history | kotfu | 2019-05-25 | 1 | -2/+2 | |
| | | ||||||
| * | Refactored implementation of HistoryItem.__str__ and added an explicit ↵ | Todd Leonhardt | 2019-05-25 | 1 | -4/+1 | |
| | | | | | | | | HistoryItem unit test | |||||
| * | Switch back to os.path from pathlib | kotfu | 2019-05-25 | 1 | -7/+6 | |
| | | | | | | | | python 3.4 pathlib doesn’t have .expanduser() | |||||
| * | switch _initialize_history() from os.path to pathlib | kotfu | 2019-05-25 | 1 | -6/+7 | |
| | | ||||||
| * | Manually check whether persistent_history_file is a directory | kotfu | 2019-05-25 | 1 | -4/+7 | |
| | | ||||||
| * | Fixed flake error | kotfu | 2019-05-25 | 1 | -0/+1 | |
| | | ||||||
| * | Resolve PR feedback | kotfu | 2019-05-25 | 2 | -33/+34 | |
| | | ||||||
| * | Fix flake8 errors | kotfu | 2019-05-24 | 1 | -3/+5 | |
| | | ||||||
| * | Populate readline history from unpickled history | kotfu | 2019-05-24 | 1 | -22/+23 | |
| | | ||||||
| * | Refactor HistoryItem to not subclass str | kotfu | 2019-05-24 | 2 | -30/+36 | |
| | | ||||||
| * | Cleanup some history tests | kotfu | 2019-05-24 | 1 | -18/+38 | |
| | | ||||||
| * | Initializing history now detects plaintext or pickle format | kotfu | 2019-05-24 | 2 | -32/+64 | |
| | | ||||||
* | | Removed _STOP_AND_EXIT cmd2 class member since it was meant to be a boolean ↵ | Kevin Van Brunt | 2019-06-04 | 1 | -6/+4 | |
| | | | | | | | | constant and was only used internally | |||||
* | | Removing duplicate functionality by calling runcmds_plus_hooks() to run cmdqueue | Kevin Van Brunt | 2019-05-24 | 1 | -10/+11 | |
| | | ||||||
* | | Running commands from history stops if a command returns True for its stop ↵ | Kevin Van Brunt | 2019-05-24 | 1 | -5/+1 | |
| | | | | | | | | value. The command loop will also terminate. | |||||
* | | Since transcript generation actually runs the commands, it now returns ↵ | Kevin Van Brunt | 2019-05-24 | 1 | -4/+10 | |
| | | | | | | | | | | | | | | whether a command returned stop. This means the command loop will stop once transcript generation completes if a command did return stop. Otherwise there is a risk in continuing to run if the application's state has already been marked to close. | |||||
* | | Fixed count in output message printed after transcript generation | Kevin Van Brunt | 2019-05-24 | 1 | -2/+7 | |
| | | ||||||
* | | Stopping transcript generation if a command returns True for its stop value | Kevin Van Brunt | 2019-05-24 | 1 | -1/+4 | |
| | | ||||||
* | | Removed most return statements from finally blocks to avoid hiding exceptions | Kevin Van Brunt | 2019-05-24 | 1 | -39/+31 | |
| | | ||||||
* | | Fixed spelling | Kevin Van Brunt | 2019-05-23 | 1 | -1/+1 | |
| | | ||||||
* | | Returning value of stop from history command when it runs a script | Kevin Van Brunt | 2019-05-23 | 1 | -4/+5 | |
| | | ||||||
* | | Change load to run scripts immediately instead of queueing commands | Kevin Van Brunt | 2019-05-23 | 1 | -63/+42 | |
|/ | ||||||
* | Modified transcript testing so that the useless exception trackeback isn't ↵ | Todd Leonhardt | 2019-05-21 | 1 | -2/+13 | |
| | | | | printed in failure cases | |||||
* | Refactor exit_code implementation | Todd Leonhardt | 2019-05-20 | 2 | -6/+12 | |
| | | | | | | | | | | | | 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 | |||||
* | Added documentation for ns_provider | Kevin Van Brunt | 2019-05-16 | 1 | -6/+8 | |
| | ||||||
* | Made ns_provider and preserve_quotes keyword-only args | Kevin Van Brunt | 2019-05-14 | 1 | -9/+8 | |
| | ||||||
* | Changed order of function arguments | Kevin Van Brunt | 2019-05-14 | 1 | -6/+7 | |
| | ||||||
* | Updated docstring | Kevin Van Brunt | 2019-05-14 | 1 | -4/+4 | |
| | ||||||
* | Added namespace provider argument to argparse decorators to support custom ↵ | Kevin Van Brunt | 2019-05-14 | 1 | -3/+21 | |
| | | | | Namespaces during argument parsing | |||||
* | Preserving originally typed quotes of Statement.output_to for use in ↵ | Kevin Van Brunt | 2019-05-13 | 3 | -19/+29 | |
| | | | | Statement.post_command() | |||||
* | Fixed parsing issue in case where output redirection (e.g. > file) appears ↵ | Kevin Van Brunt | 2019-05-13 | 2 | -43/+44 | |
| | | | | | | before a pipe. In that case, the pipe was given precedence even though it appeared later in the command. | |||||
* | Restored newlines to ACArgumentParser help and error text | Kevin Van Brunt | 2019-05-09 | 1 | -4/+2 | |
| |