summaryrefslogtreecommitdiff
path: root/cmd2/utils.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Renamed display_width to ansi_safe_wcswidthKevin Van Brunt2018-11-161-2/+3
|
* Added wrapper for wcswidth that removes ansi escape charactersKevin Van Brunt2018-11-151-0/+11
|
* Fixed error where an inner stream like StringIO doesn't have a buffer attribute.Kevin Van Brunt2018-10-091-2/+8
|
* Updated docstringKevin Van Brunt2018-10-031-2/+2
|
* Made encode and error class members of StdSimKevin Van Brunt2018-10-031-20/+20
|
* Fixed error where binary data was crashing getvalue. Added accessor methods ↵Kevin Van Brunt2018-10-031-13/+27
| | | | for retrieving StdSim contents as bytes.
* Removed unneeded escapes in regular expressionsKevin Van Brunt2018-09-281-1/+1
|
* Addressing code review commentsKevin Van Brunt2018-09-271-1/+1
|
* Made function to unquote redirection charactersKevin Van Brunt2018-09-261-0/+12
|
* Backing up macro command workKevin Van Brunt2018-09-241-3/+3
|
* StdSim write methods now raise a TypeError exception if passed the wrong typeTodd Leonhardt2018-09-241-0/+4
| | | | | Also: - Added explicit unit tests for StdSim to test_utils.py
* Fixed several hack classes build to simulate file descriptorsTodd Leonhardt2018-09-231-0/+54
| | | | | | | | | Now there is a single class, StdSim in utils.py, which is intended to simulate stdout and stderr file objects. This class replaced the following: - pyscript_bridge.py::CopyStream - transcript.py::OutputTrap - conftest.py::StdOut
* Removed remaining type hints in docstringsKevin Van Brunt2018-09-211-1/+1
|
* Simplified functions moreKevin Van Brunt2018-09-211-5/+7
|
* Added unit tests for new utility functions and fixed a commentTodd Leonhardt2018-09-211-1/+1
|
* Refactored do_setKevin Van Brunt2018-09-211-1/+23
|
* Add natural sorting (sorting case insensitively as well as numerically)Lance Starr2018-09-191-1/+47
|
* 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
* Added alphabetical_sort() functionKevin Van Brunt2018-08-011-0/+9
|
* Added matches_sorted member to support custom sorting order of ↵Kevin Van Brunt2018-08-011-0/+13
| | | | | | | tab-completion matches Made all sorting alphabetical Fixed case where extra slash was printing when tab completing users on Windows
* Merge branch 'master' into historyTodd Leonhardt2018-07-121-16/+0
|\
| * Deleted the CmdResult helper classTodd Leonhardt2018-07-111-16/+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
* | Added --clear argument to history commandKevin Van Brunt2018-07-111-2/+2
|/ | | | | | 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.
* Added yet more type hintingTodd Leonhardt2018-06-101-4/+6
|
* Working on improving type hintingTodd Leonhardt2018-06-091-1/+6
| | | | | Also: - Refactored perror() to remove a rarely used optional argument which was unecessary
* Make changes requested in PR #413kotfu2018-05-241-2/+11
|
* Move more code from cmd2.py into utils.pykotfu2018-05-061-0/+89
|
* Merge branch 'test_merge' into test_ply_mergeEric Lin2018-05-021-0/+32
|\
| * Merge branch 'bash_completion' into bash_to_pyscriptEric Lin2018-05-021-0/+15
| |\
| | * Merge remote-tracking branch 'origin/master' into bash_completionEric Lin2018-04-271-0/+14
| | | | | | | | | | | | Updated argcomplete_bridge to use new constants/utils.
| * | Added support for customizing the pyscript bridge pystate object name.Eric Lin2018-05-021-0/+30
| |/ | | | | | | | | | | | | Removed all legacy pystate objects. Changed default behavior to clear _last_result before each command Added utility for creating named tuples with default values Added tests to exercise new changes.
* | extract strip_quotes() to utils modulekotfu2018-04-301-0/+12
|/
* Create utils module for utility functionskotfu2018-04-271-0/+13