You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+26-5Lines changed: 26 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,32 @@
2
2
* Bug Fixes
3
3
* Fixed unit tests on Python 3.7 due to changes in how re.escape() behaves in Python 3.7
4
4
* Enhancements
5
-
* Added new **with_argument_parser** decorator for argparse-based argument parsing of command arguments
6
-
* This replaces the old **options** decorator for optparse-based argument parsing
7
-
* The old decorator is still present for now, but should be considered *deprecated* and will eventually be removed
8
-
* See the **Argument Processing** section of the documentation for more information
9
-
* Alternatively, see the **argparse_example.py** example
5
+
* Three new decorators for **do_*** commands to make argument parsing easier
6
+
* **with_argument_list** decorator to change argument type from str to List[str]
7
+
* **do_*** commands get a single argument which is a list of strings, as pre-parsed by shlex.split()
8
+
* **with_argument_parser** decorator for strict argparse-based argument parsing of command arguments
9
+
* **do_*** commands get a single argument which is the output of argparse.parse_args()
10
+
* **with_argparser_and_unknown_args** decorator for argparse-based argument parsing, but allowing unknown args
11
+
* **do_*** commands get two arguments, the output of argparse.parse_known_args()
12
+
* See the **Argument Processing** section of the documentation for more information on these decorators
13
+
* Alternatively, see the **argparse_example.py** and **arg_print.py** examples
14
+
* The **__relative_load** command is now hidden from the help menu by default
15
+
* This command is not intended to be called from the command line, only from within scripts
16
+
* The **set** command now has an additional **-a/--all** option to also display read-only settings
17
+
* The **history** command can now run, edit, and save prior commands, in addition to the prior behavior of displaying prior commands.
18
+
* Commands Removed
19
+
* The **cmdenvironment** has been removed and its functionality incorporated into the **-a/--all** argument to **set**
20
+
* The **show** command has been removed. Its functionality has always existing within **set** and continues to do so
21
+
* The **save** command has been removed. The capability to save prior commands is now part of the **history** command.
22
+
* The **run** command has been removed. The capability to run prior commands is now part of the **history** command.
23
+
* Other changes
24
+
* The **edit** command no longer allows you to edit prior commands. The capability to edit prior commands is now part of the **history** command. The **edit** command still allows you to edit arbitrary files.
25
+
* the **autorun_on_edit** setting has been removed.
26
+
* Deprecations
27
+
* The old **options** decorator for optparse-based argument parsing is now *deprecated*
28
+
* The old decorator is still present for now, but will eventually be removed in a future release
29
+
* ``cmd2`` no longer includes **optparse.make_option** so if your app needs it you need to import it directly from optparse
0 commit comments