0.8.3 (April 09, 2018)
-
Bug Fixes
- Fixed
help
command not calling functions for help topics - Fixed not being able to use quoted paths when redirecting with
<
and>
- Fixed
-
Enhancements
- Tab completion has been overhauled and now supports completion of strings with quotes and spaces.
- Tab completion will automatically add an opening quote if a string with a space is completed.
- Added
delimiter_complete
function for tab completing delimited strings - Added more control over tab completion behavior including the following flags. The use of these flags is documented in cmd2.py
allow_appended_space
allow_closing_quote
- Due to the tab completion changes, non-Windows platforms now depend on wcwidth.
- An alias name can now match a command name.
- An alias can now resolve to another alias.
-
Attribute Changes (Breaks backward compatibility)
exclude_from_help
is now calledhidden_commands
since these commands are hidden from things other than help, including tab completion- This list also no longer takes the function names of commands (
do_history
), but instead uses the command names themselves (history
)
- This list also no longer takes the function names of commands (
excludeFromHistory
is now calledexclude_from_history
cmd_with_subs_completer()
no longer takes an argument calledbase
. Adding tab completion to subcommands has been simplified to declaring it in the
subcommand parser's default settings. This easily allows arbitrary completers like path_complete to be used.
See subcommands.py for an example of how to use
tab completion in subcommands. In addition, the docstring forcmd_with_subs_completer()
offers more details.