diff options
author | Eric Lin <anselor@gmail.com> | 2018-05-16 10:39:49 -0400 |
---|---|---|
committer | Eric Lin <anselor@gmail.com> | 2018-05-16 10:39:49 -0400 |
commit | 371284d20370a8e85dd8527d9bbcc6267b335cde (patch) | |
tree | 002ac709eca15522a0b1abaa235aae04975b08e6 /cmd2/constants.py | |
parent | ab8194e92b9c3728d8f86cb9c81de180b6884eee (diff) | |
parent | a9b712108e5af49937b0af3aa51db2ebe5c159e4 (diff) | |
download | cmd2-git-371284d20370a8e85dd8527d9bbcc6267b335cde.tar.gz |
Merge branch 'master' into pyscript
Diffstat (limited to 'cmd2/constants.py')
-rw-r--r-- | cmd2/constants.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd2/constants.py b/cmd2/constants.py index 838650e5..b829000f 100644 --- a/cmd2/constants.py +++ b/cmd2/constants.py @@ -4,9 +4,14 @@ import re -# Used for command parsing, tab completion and word breaks. Do not change. +# Used for command parsing, output redirection, tab completion and word +# breaks. Do not change. QUOTES = ['"', "'"] -REDIRECTION_CHARS = ['|', '>'] +REDIRECTION_PIPE = '|' +REDIRECTION_OUTPUT = '>' +REDIRECTION_APPEND = '>>' +REDIRECTION_CHARS = [REDIRECTION_PIPE, REDIRECTION_OUTPUT] +REDIRECTION_TOKENS = [REDIRECTION_PIPE, REDIRECTION_OUTPUT, REDIRECTION_APPEND] # Regular expression to match ANSI escape codes ANSI_ESCAPE_RE = re.compile(r'\x1b[^m]*m') |