Skip to content

Commit 1a06288

Browse files
committed
Reword output for cmdenvironment
This is an attempt at making the cmdenvironment output more informative and easier to understand.
1 parent 89f58e2 commit 1a06288

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cmd2.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,14 +1136,16 @@ def do_cmdenvironment(self, args):
11361136
self.stdout.write("""
11371137
Commands are case-sensitive: {}
11381138
Commands may be terminated with: {}
1139-
Command-line arguments allowed: {}
1139+
Arguments at invocation allowed: {}
11401140
Output redirection and pipes allowed: {}
11411141
Parsing of @options commands:
1142-
Use POSIX-style argument parser (vs Windows): {}
1143-
Strip Quotes when using Windows-style argument parser: {}
1144-
Use a list of arguments instead of a single argument string: {}
1142+
Shell lexer mode for command argument splitting: {}
1143+
Strip Quotes after splitting arguments: {}
1144+
Argument type: {}
11451145
\n""".format(not self.case_insensitive, str(self.terminators), self.allow_cli_args, self.allow_redirection,
1146-
POSIX_SHLEX, STRIP_QUOTES_FOR_NON_POSIX, USE_ARG_LIST))
1146+
"POSIX" if POSIX_SHLEX else "non-POSIX",
1147+
"True" if STRIP_QUOTES_FOR_NON_POSIX and not POSIX_SHLEX else "False",
1148+
"List of argument strings" if USE_ARG_LIST else "string of space-separated arguments"))
11471149

11481150
def do_help(self, arg):
11491151
"""List available commands with "help" or detailed help with "help cmd"."""

0 commit comments

Comments
 (0)