diff options
author | kotfu <kotfu@kotfu.net> | 2018-08-11 19:54:10 -0600 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-08-11 19:54:10 -0600 |
commit | 1daf5d2cb63145408520f39c799425a82b2ec948 (patch) | |
tree | 5b1458aaaf54b9b740974ab14cacdb5ade4e2724 /cmd2/constants.py | |
parent | 0053f18fade2f2148daf19975581e8372ca7a69b (diff) | |
download | cmd2-git-1daf5d2cb63145408520f39c799425a82b2ec948.tar.gz |
First pass at improved colorizing
- colors setting now allows Always, Terminal, Never values
- poutput() and perror() honor these new settings
Diffstat (limited to 'cmd2/constants.py')
-rw-r--r-- | cmd2/constants.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd2/constants.py b/cmd2/constants.py index d3e8a125..3c133b70 100644 --- a/cmd2/constants.py +++ b/cmd2/constants.py @@ -17,3 +17,8 @@ REDIRECTION_TOKENS = [REDIRECTION_PIPE, REDIRECTION_OUTPUT, REDIRECTION_APPEND] ANSI_ESCAPE_RE = re.compile(r'\x1b[^m]*m') LINE_FEED = '\n' + +# values for colors setting +COLORS_NEVER = 'Never' +COLORS_TERMINAL = 'Terminal' +COLORS_ALWAYS = 'Always' |