diff options
author | kotfu <kotfu@kotfu.net> | 2018-05-27 21:38:51 -0600 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-05-27 21:38:51 -0600 |
commit | 3b49e52cc55cbfc7ed8fa0cedc97d626325a4bd1 (patch) | |
tree | bae21b6a21999a3a68ba653a77640638d9cd47b0 | |
parent | f616d78ba70b6f48a2c94a66d4657f4e214b3155 (diff) | |
parent | 76c29610672e30a12aae3d75adf34b085571fe9f (diff) | |
download | cmd2-git-3b49e52cc55cbfc7ed8fa0cedc97d626325a4bd1.tar.gz |
Merge branch 'master' into plugin_functions
# Conflicts:
# cmd2/cmd2.py
-rw-r--r-- | CHANGELOG.md | 19 | ||||
-rw-r--r-- | cmd2/cmd2.py | 14 | ||||
-rw-r--r-- | docs/hooks.rst | 2 |
3 files changed, 14 insertions, 21 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 30bdc4a0..5836d34d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,7 @@ -## 0.9.0 (TBD, 2018) +## 0.9.0 (May TBD, 2018) * Bug Fixes * If self.default_to_shell is true, then redirection and piping are now properly passed to the shell. Previously it was truncated. * Submenus now call all hooks, it used to just call precmd and postcmd. - * Fixed ``AttributeError`` on Windows when running a ``select`` command cause by **pyreadline** not implementing ``remove_history_item`` * Enhancements * Automatic completion of ``argparse`` arguments via ``cmd2.argparse_completer.AutoCompleter`` * See the [tab_autocompletion.py](https://github.com/python-cmd2/cmd2/blob/master/examples/tab_autocompletion.py) example for a demonstration of how to use this feature @@ -17,9 +16,6 @@ * ``identchars`` is now ignored. The standardlibrary cmd uses those characters to split the first "word" of the input, but cmd2 hasn't used those for a while, and the new parsing logic parses on whitespace, which has the added benefit of full unicode support, unlike cmd or prior versions of cmd2. * ``set_posix_shlex`` function and ``POSIX_SHLEX`` variable have been removed. Parsing behavior is now always the more forgiving ``posix=false``. * ``set_strip_quotes`` function and ``STRIP_QUOTES_FOR_NON_POSIX`` have been removed. Quotes are stripped from arguments when presented as a list (a la ``sys.argv``), and present when arguments are presented as a string (like the string passed to do_*). - * Enhanced the ``py`` console in the following ways - * Added tab completion of Python identifiers instead of **cmd2** commands - * Separated the ``py`` console history from the **cmd2** history * Changes * ``strip_ansi()`` and ``strip_quotes()`` functions have moved to new utils module * Several constants moved to new constants module @@ -34,11 +30,24 @@ * Replaced by default AutoCompleter implementation for all commands using argparse * Deleted support for old method of calling application commands with ``cmd()`` and ``self`` * ``cmd2.redirector`` is no longer supported. Output redirection can only be done with '>' or '>>' + * Deleted ``postparse()`` hook since it was redundant with ``postparsing_precmd`` * Python 2 no longer supported * ``cmd2`` now supports Python 3.4+ * Known Issues * Some developers have noted very slow performance when importing the ``cmd2`` module. The issue it intermittant, and investigation of the root cause is ongoing. + +## 0.8.6 (May 27, 2018) +* Bug Fixes + * Commands using the @with_argparser_and_unknown_args were not correctly recognized when tab completing + * Fixed issue where completion display function was overwritten when a submenu quits + * Fixed ``AttributeError`` on Windows when running a ``select`` command cause by **pyreadline** not implementing ``remove_history_item`` +* Enhancements + * Added warning about **libedit** variant of **readline** not being supported on macOS + * Added tab-completion of alias names in value filed of **alias** command + * Enhanced the ``py`` console in the following ways + * Added tab completion of Python identifiers instead of **cmd2** commands + * Separated the ``py`` console history from the **cmd2** history ## 0.8.5 (April 15, 2018) * Bug Fixes diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index d1d9747c..045e6a1b 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -1624,20 +1624,6 @@ class Cmd(cmd.Cmd): return raw # noinspection PyMethodMayBeStatic - def postparse(self, statement: Statement) -> Statement: - """Hook that runs immediately after parsing the user input. - - :param statement: Statement object populated by parsing - :return: Statement - potentially modified Statement object - """ - return statement - - # - def hook_postparsing(self, statement: Statement) -> Tuple[bool, Statement]: - stop = False - return stop, statement - - # noinspection PyMethodMayBeStatic def postparsing_precmd(self, statement: Statement) -> Tuple[bool, Statement]: """This runs after parsing the command-line, but before anything else; even before adding cmd to history. diff --git a/docs/hooks.rst b/docs/hooks.rst index b07f1e94..75febb2b 100644 --- a/docs/hooks.rst +++ b/docs/hooks.rst @@ -274,8 +274,6 @@ the various hook methods, presented in chronological order starting with the one .. automethod:: cmd2.cmd2.Cmd.preparse -.. automethod:: cmd2.cmd2.Cmd.postparse - .. automethod:: cmd2.cmd2.Cmd.postparsing_precmd .. automethod:: cmd2.cmd2.Cmd.precmd |