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
(no system selected) > system select <TAB>
almalinux-9.3 centos-7 darwin-22 debian-12 ubuntu-22.04
(no system selected) > system select almalinux-9.3 # hello
Usage: system {list, select, image, container} ...
Error: unrecognized arguments: # hello
(no system selected) >
We get the "unrecognized arguments" error.
This seems to be corrected by this change:
diff --git a/cmd2/parsing.py b/cmd2/parsing.py
index fc28b634..0c39eca3 100755
--- a/cmd2/parsing.py+++ b/cmd2/parsing.py@@ -35,7 +35,7 @@ def shlex_split(str_to_split: str) -> List[str]:
:param str_to_split: the string being split
:return: A list of tokens
"""
- return shlex.split(str_to_split, comments=False, posix=False)+ return shlex.split(str_to_split, comments=True, posix=False)
version
python 3.12, cmd2 2.4.3
The text was updated successfully, but these errors were encountered:
summary
when a
do_
command is decorated with@cmd2.with_argparser
it does not correctly remove trailing comments.For example:
and given the command:
We get the "unrecognized arguments" error.
This seems to be corrected by this change:
version
python 3.12, cmd2 2.4.3
The text was updated successfully, but these errors were encountered: