diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-05-13 10:08:09 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-05-13 10:08:09 -0400 |
commit | 2c5417be5cc52f7c76097f85664adda2c976b1e4 (patch) | |
tree | 57f143a32eb3ce2c448b7d19b15c31fb0c48cc87 /cmd2/cmd2.py | |
parent | 1dd2c0eae0a578deda8257a5592daf9aca2809ee (diff) | |
download | cmd2-git-2c5417be5cc52f7c76097f85664adda2c976b1e4.tar.gz |
Fixed parsing issue in case where output redirection (e.g. > file) appears before a pipe.
In that case, the pipe was given precedence even though it appeared later in the command.
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 993162d1..d197e75e 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -3331,18 +3331,21 @@ class Cmd(cmd.Cmd): help='output commands to a script file, implies -s'), ACTION_ARG_CHOICES, ('path_complete',)) setattr(history_action_group.add_argument('-t', '--transcript', - help='output commands and results to a transcript file, implies -s'), + help='output commands and results to a transcript file,\n' + 'implies -s'), ACTION_ARG_CHOICES, ('path_complete',)) history_action_group.add_argument('-c', '--clear', action='store_true', help='clear all history') history_format_group = history_parser.add_argument_group(title='formatting') - history_script_help = 'output commands in script format, i.e. without command numbers' - history_format_group.add_argument('-s', '--script', action='store_true', help=history_script_help) - history_expand_help = 'output expanded commands instead of entered command' - history_format_group.add_argument('-x', '--expanded', action='store_true', help=history_expand_help) + history_format_group.add_argument('-s', '--script', action='store_true', + help='output commands in script format, i.e. without command\n' + 'numbers') + history_format_group.add_argument('-x', '--expanded', action='store_true', + help='output fully parsed commands with any aliases and\n' + 'macros expanded, instead of typed commands') history_format_group.add_argument('-v', '--verbose', action='store_true', - help='display history and include expanded commands if they' - ' differ from the typed command') + help='display history and include expanded commands if they\n' + 'differ from the typed command') history_arg_help = ("empty all history items\n" "a one history item by number\n" |