summaryrefslogtreecommitdiff
path: root/cmd2
Commit message (Collapse)AuthorAgeFilesLines
* Allow newlines inside unclosed quotes. Fixes #495kotfu2018-08-081-3/+24
|
* parse_command_only now appropriately sets multiline_commandkotfu2018-08-081-4/+11
|
* Addeded utility function for combining unicode normalization and casefolding ↵Todd Leonhardt2018-08-021-6/+16
| | | | | | | | into a single step Also: - Updated the alphabetical sort utility function to use this - Started adding explicit unit tests for functions in utils.py
* Updated argparse_completer to automatically set the matches_sorted flag for ↵Eric Lin2018-08-011-0/+1
| | | | tabular results. Updated the example to demonstrate pre-sorted tabular results.
* Added alphabetical_sort() functionKevin Van Brunt2018-08-012-7/+14
|
* Added matches_sorted member to support custom sorting order of ↵Kevin Van Brunt2018-08-012-17/+40
| | | | | | | tab-completion matches Made all sorting alphabetical Fixed case where extra slash was printing when tab completing users on Windows
* Fix Sphinx warning in preparse docstringTodd Leonhardt2018-07-301-2/+2
|
* Use setuptools_scm for version numberskotfu2018-07-292-4/+10
|
* Merged master with bug fix for #474Todd Leonhardt2018-07-171-10/+8
|\
| * Bug fix and unit tests for #474kotfu2018-07-161-10/+8
| |
* | Started updating CHANGELOGTodd Leonhardt2018-07-161-1/+1
| | | | | | | | | | | | Also: - Bumped version to 0.9.4 - Updated info in Readme and Sphinx docs to reflect new dependency on attrs
* | Add usage warning to preparse() for #417kotfu2018-07-151-3/+13
| |
* | Fix for #417, call preparse()kotfu2018-07-151-1/+1
| |
* | Resolved merge conflict from merging master into plugin_functionsTodd Leonhardt2018-07-122-63/+62
|\ \ | |/
| * Merge branch 'master' into historyTodd Leonhardt2018-07-122-38/+0
| |\
| | * Deleted the CmdResult helper classTodd Leonhardt2018-07-112-38/+0
| | | | | | | | | | | | | | | | | | | | | | | | The CmdResult helper class was deprecated in the previous release. This commit deletes it. - The new CommandResult class is an improved replacement Also: - Deleted the namedtuple_with_two_defaults helper function which is now no longer used
| * | Merge branch 'master' into historyKevin Van Brunt2018-07-121-2/+7
| |\ \ | | |/
| * | Added --clear argument to history commandKevin Van Brunt2018-07-112-24/+61
| | | | | | | | | | | | | | | | | | Added better error checking when loading readline history file Improved some error messages Changed IOError usages to OSError since they were merged in Python 3.3.
* | | Merge branch 'master' into plugin_functionsTodd Leonhardt2018-07-111-2/+7
|\ \ \ | | |/ | |/|
| * | Allow onecmd to accept a raw string for backward compatibility with cmdTodd Leonhardt2018-07-101-2/+7
| |/ | | | | | | This addresses #464
* | Merge branch 'master' into plugin_functionskotfu2018-07-101-1/+1
|\ \ | |/
| * Use instance attribute for terminatorsKyle Sunden2018-07-101-1/+1
| | | | | | If the `terminators` is the default, `None`, the function fails because the local variable was not updated.
* | Fixed a Sphinx autodoc warning due to minor formatting issues in docstring ↵Todd Leonhardt2018-07-091-2/+3
| | | | | | | | of ppaged method
* | Fixed a couple type hints and minor pep8-style formatting issuesTodd Leonhardt2018-07-093-30/+33
| |
* | Add type hinting to hook methodskotfu2018-07-071-12/+12
| |
* | Move LINE_FEED into constantskotfu2018-07-072-5/+5
| |
* | Merge branch 'master' into plugin_functionskotfu2018-07-054-9/+36
|\ \ | |/
| * Bumped version to 0.9.3 now that 0.9.2 release is outTodd Leonhardt2018-06-281-1/+1
| |
| * Bump version to 0.9.2 in preparation for releaseTodd Leonhardt2018-06-281-1/+1
| |
| * Merge branch 'master' into autocompleterTodd Leonhardt2018-06-275-81/+94
| |\
| | * Fix bug for startup script with spacesTodd Leonhardt2018-06-261-1/+1
| | |
| | * Merge branch 'master' into command_resultTodd Leonhardt2018-06-251-1/+0
| | |\
| | | * Removed unused class memberKevin Van Brunt2018-06-251-1/+0
| | | |
| | * | Deprecated CmdResult helper class and promoted CommandResultTodd Leonhardt2018-06-233-3/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These classes are subtly different, particularly in terms of their truthiness. CmdResult - attributes: out, err, war - truthy: if err is falsy CommandResult - attributes: stdout, stderr, data - truthy: if err is falsy AND data is not None So CmdResult was oriented to provide essentially info, error, and warning messages to the user (typically as stirngs), whereas CommandResult is geared towards providing info and error messages to the user as strings in addition to data to the user in a command-specific format which is arbitrary other than it should never be None if the command succeeds.
| * | Added some explanation of CompletionItem usage in codeEric Lin2018-06-131-3/+30
| | |
* | | Add command finalization hookskotfu2018-07-052-6/+51
| | |
* | | Merge branch 'master' into plugin_functionskotfu2018-06-221-4/+6
|\ \ \ | | |/ | |/|
| * | Corrected how we force a redisplay in pyreadlineKevin Van Brunt2018-06-221-4/+6
| | |
* | | Postcommand hooks implementedkotfu2018-06-222-13/+23
| | |
* | | Revise precommand hooks to use `data` parameterkotfu2018-06-211-3/+3
| | |
* | | Use `data` instead of `params`kotfu2018-06-211-7/+7
| | |
* | | Revised postparsing hookskotfu2018-06-211-6/+26
| | |
* | | Merge branch 'master' into plugin_functionskotfu2018-06-212-56/+57
|\ \ \ | |/ / | | | | | | | | | # Conflicts: # cmd2/cmd2.py
| * | Moved clipboard/pastebuffer functionality to new file clipboard.pyTodd Leonhardt2018-06-182-58/+58
| | | | | | | | | | | | | | | Also: - Converted global can_clip variable to an instance attribute of cmd2.Cmd class
* | | Merge branch 'master' into plugin_functionskotfu2018-06-198-349/+456
|\ \ \ | |/ /
| * | Improved docstring for ppaged()Todd Leonhardt2018-06-161-0/+2
| | | | | | | | | | | | | | | | | | Added a couple lines to the ppaged() docstring to help explain the advantages and disadvantages of chopping vs wrapping and when it would be best to do one as opposed to the other. This should help developers understand the full potential of the ppaged() method.
| * | Altered behavior further to lean towards giving the developer more power ↵Todd Leonhardt2018-06-161-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | over the end user Specifically: - PAGER environment variable is not used by default to set cmd2.Cmd.pager - This is done to ensure a consistent behavior of cmd2 applications across users by default Developers are free to set pager and pager_chop in the __init__() for their class derived from cmd2.Cmd differently to ensure whatever behavior they desire. Also: - Updated the paged_output.py example to demonstrate using ppaged() with both wrapped and chopped/truncated text
| * | Dramatically changed the approach to this PRTodd Leonhardt2018-06-161-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes include: - pager is no longer a settable parameter which can be changed by the end user at runtime - The cmd2.Cmd class now has two different attributes: - pager - contains command-line command to use to display wrapped text using a pager - By default set to PAGER environment variable if it exists - 'more' on Windows or 'less -RXF' on POSIX - pager_chop - contains command-line command to use to display chopped (truncated) text using a pager - Set to same thing as pager unless pager starts with 'less', in which case a ' -S' gets appended - The cmd2.Cmd.ppaged() method now has an additional optional argument "chop" which defaults to False - If chop is True, then self.pager_chop gets used as the pager - If chop is False, then slef.pager gets used as the pager I couldn't think of any single solution which would somehow magically make all stakeholders perfectly happy. Hopefully this is a reasonable enough compromise that everyone feels that they can get what they need without too much pain ;-)
| * | Merge branch 'master' into ppaged_pager_envTodd Leonhardt2018-06-132-4/+9
| |\ \ | | |/
| | * Added a check to verify the existence of a descriptive header. Added a ↵Eric Lin2018-06-132-4/+9
| | | | | | | | | | | | constant. Updated example to use the constant.