|
23 | 23 | * Added support for custom Namespaces in the argparse decorators. See description of `ns_provider` argument |
24 | 24 | for more information. |
25 | 25 | * Transcript testing now sets the `exit_code` returned from `cmdloop` based on Success/Failure |
26 | | -* Potentially breaking changes |
| 26 | + * The history of entered commands previously was saved using the readline persistence mechanism, |
| 27 | + and only persisted if you had readline installed. Now history is persisted independent of readline; user |
| 28 | + input from previous invocations of `cmd2` based apps now shows in the `history` command. |
| 29 | + |
| 30 | +* Breaking changes |
27 | 31 | * Replaced `unquote_redirection_tokens()` with `unquote_specific_tokens()`. This was to support the fix |
28 | 32 | that allows terminators in alias and macro values. |
29 | 33 | * Changed `Statement.pipe_to` to a string instead of a list |
30 | 34 | * `preserve_quotes` is now a keyword-only argument in the argparse decorators |
31 | 35 | * Refactored so that `cmd2.Cmd.cmdloop()` returns the `exit_code` instead of a call to `sys.exit()` |
32 | | - * It is now applicaiton developer's responsibility to treat the return value from `cmdloop()` accordingly |
| 36 | + It is now application developer's responsibility to treat the return value from `cmdloop()` accordingly |
| 37 | + * Only valid commands are persistent in history between invocations of `cmd2` based apps. Previously |
| 38 | + all user input was persistent in history. If readline is installed, the history available with the up and |
| 39 | + down arrow keys (readline history) may not match that shown in the `history` command, because `history` |
| 40 | + only tracks valid input, while readline history captures all input. |
| 41 | + * History is now persisted in a binary format, not plain text format. Previous history files are destroyed |
| 42 | + on first launch of a `cmd2` based app of version 0.9.13 or higher. |
| 43 | + * HistoryItem class is no longer a subclass of `str`. If you are directly accessing the `.history` attribute |
| 44 | + of a `cmd2` based app, you will need to update your code to use `.history.get(1).statement.raw` instead. |
33 | 45 | * **Python 3.4 EOL notice** |
34 | 46 | * Python 3.4 reached its [end of life](https://www.python.org/dev/peps/pep-0429/) on March 18, 2019 |
35 | 47 | * This is the last release of `cmd2` which will support Python 3.4 |
|
38 | 50 | * Bug Fixes |
39 | 51 | * Fixed a bug in how redirection and piping worked inside ``py`` or ``pyscript`` commands |
40 | 52 | * Fixed bug in `async_alert` where it didn't account for prompts that contained newline characters |
41 | | - * Fixed path completion case when CWD is just a slash. Relative path matches were incorrectly prepended with a slash. |
| 53 | + * Fixed path completion case when CWD is just a slash. Relative path matches were incorrectly prepended with a slash. |
42 | 54 | * Enhancements |
43 | 55 | * Added ability to include command name placeholders in the message printed when trying to run a disabled command. |
44 | 56 | * See docstring for ``disable_command()`` or ``disable_category()`` for more details. |
|
60 | 72 | * ``_report_disabled_command_usage()`` - in all cases since this is called when a disabled command is run |
61 | 73 | * Removed *** from beginning of error messages printed by `do_help()` and `default()` |
62 | 74 | * Significantly refactored ``cmd.Cmd`` class so that all class attributes got converted to instance attributes, also: |
63 | | - * Added ``allow_redirection``, ``terminators``, ``multiline_commands``, and ``shortcuts`` as optional arguments |
| 75 | + * Added ``allow_redirection``, ``terminators``, ``multiline_commands``, and ``shortcuts`` as optional arguments |
64 | 76 | to ``cmd.Cmd.__init__()` |
65 | 77 | * A few instance attributes were moved inside ``StatementParser`` and properties were created for accessing them |
66 | 78 | * ``self.pipe_proc`` is now called ``self.cur_pipe_proc_reader`` and is a ``ProcReader`` class. |
|
98 | 110 | ``cmd2`` convention of setting ``self.matches_sorted`` to True before returning the results if you have already |
99 | 111 | sorted the ``CompletionItem`` list. Otherwise it will be sorted using ``self.matches_sort_key``. |
100 | 112 | * Removed support for bash completion since this feature had slow performance. Also it relied on |
101 | | - ``AutoCompleter`` which has since developed a dependency on ``cmd2`` methods. |
| 113 | + ``AutoCompleter`` which has since developed a dependency on ``cmd2`` methods. |
102 | 114 | * Removed ability to call commands in ``pyscript`` as if they were functions (e.g. ``app.help()``) in favor |
103 | 115 | of only supporting one ``pyscript`` interface. This simplifies future maintenance. |
104 | 116 | * No longer supporting C-style comments. Hash (#) is the only valid comment marker. |
|
118 | 130 | * Fixed bug where the ``set`` command was not tab completing from the current ``settable`` dictionary. |
119 | 131 | * Enhancements |
120 | 132 | * Changed edit command to use do_shell() instead of calling os.system() |
121 | | - |
| 133 | + |
122 | 134 | ## 0.9.8 (February 06, 2019) |
123 | 135 | * Bug Fixes |
124 | 136 | * Fixed issue with echoing strings in StdSim. Because they were being sent to a binary buffer, line buffering |
|
139 | 151 | * Deletions (potentially breaking changes) |
140 | 152 | * Deleted ``Cmd.colorize()`` and ``Cmd._colorcodes`` which were deprecated in 0.9.5 |
141 | 153 | * Replaced ``dir_exe_only`` and ``dir_only`` flags in ``path_complete`` with optional ``path_filter`` function |
142 | | - that is used to filter paths out of completion results. |
| 154 | + that is used to filter paths out of completion results. |
143 | 155 | * ``perror()`` no longer prepends "ERROR: " to the error message being printed |
144 | | - |
| 156 | + |
145 | 157 | ## 0.9.6 (October 13, 2018) |
146 | 158 | * Bug Fixes |
147 | 159 | * Fixed bug introduced in 0.9.5 caused by backing up and restoring `self.prompt` in `pseudo_raw_input`. |
|
167 | 179 | the argparse object. Also, single-character tokens that happen to be a |
168 | 180 | prefix char are not treated as flags by argparse and AutoCompleter now |
169 | 181 | matches that behavior. |
170 | | - * Fixed bug where AutoCompleter was not distinguishing between a negative number and a flag |
171 | | - * Fixed bug where AutoCompleter did not handle -- the same way argparse does (all args after -- are non-options) |
| 182 | + * Fixed bug where AutoCompleter was not distinguishing between a negative number and a flag |
| 183 | + * Fixed bug where AutoCompleter did not handle -- the same way argparse does (all args after -- are non-options) |
172 | 184 | * Enhancements |
173 | 185 | * Added ``exit_code`` attribute of ``cmd2.Cmd`` class |
174 | 186 | * Enables applications to return a non-zero exit code when exiting from ``cmdloop`` |
|
180 | 192 | * These allow you to provide feedback to the user in an asychronous fashion, meaning alerts can |
181 | 193 | display when the user is still entering text at the prompt. See [async_printing.py](https://github.com/python-cmd2/cmd2/blob/master/examples/async_printing.py) |
182 | 194 | for an example. |
183 | | - * Cross-platform colored output support |
| 195 | + * Cross-platform colored output support |
184 | 196 | * ``colorama`` gets initialized properly in ``Cmd.__init()`` |
185 | 197 | * The ``Cmd.colors`` setting is no longer platform dependent and now has three values: |
186 | | - * Terminal (default) - output methods do not strip any ANSI escape sequences when output is a terminal, but |
| 198 | + * Terminal (default) - output methods do not strip any ANSI escape sequences when output is a terminal, but |
187 | 199 | if the output is a pipe or a file the escape sequences are stripped |
188 | 200 | * Always - output methods **never** strip ANSI escape sequences, regardless of the output destination |
189 | 201 | * Never - output methods strip all ANSI escape sequences |
|
193 | 205 | * Deprecations |
194 | 206 | * Deprecated the built-in ``cmd2`` support for colors including ``Cmd.colorize()`` and ``Cmd._colorcodes`` |
195 | 207 | * Deletions (potentially breaking changes) |
196 | | - * The ``preparse``, ``postparsing_precmd``, and ``postparsing_postcmd`` methods *deprecated* in the previous release |
| 208 | + * The ``preparse``, ``postparsing_precmd``, and ``postparsing_postcmd`` methods *deprecated* in the previous release |
197 | 209 | have been deleted |
198 | 210 | * The new application lifecycle hook system allows for registration of callbacks to be called at various points |
199 | 211 | in the lifecycle and is more powerful and flexible than the previous system |
200 | 212 | * ``alias`` is now a command with sub-commands to create, list, and delete aliases. Therefore its syntax |
201 | 213 | has changed. All current alias commands in startup scripts or transcripts will break with this release. |
202 | 214 | * `unalias` was deleted since ``alias delete`` replaced it |
203 | | - |
| 215 | + |
204 | 216 | ## 0.9.4 (August 21, 2018) |
205 | 217 | * Bug Fixes |
206 | 218 | * Fixed bug where ``preparse`` was not getting called |
207 | | - * Fixed bug in parsing of multiline commands where matching quote is on another line |
| 219 | + * Fixed bug in parsing of multiline commands where matching quote is on another line |
208 | 220 | * Enhancements |
209 | 221 | * Improved implementation of lifecycle hooks to support a plugin |
210 | 222 | framework, see ``docs/hooks.rst`` for details. |
|
0 commit comments