summaryrefslogtreecommitdiff
path: root/docs/features
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-01-08 17:11:17 -0500
committerGitHub <noreply@github.com>2020-01-08 17:11:17 -0500
commitdb093b630ed487838337a04a28af79475d37d1e0 (patch)
treed78cd5fcbb4946206377a162bbcb3b7c01576d15 /docs/features
parent97dd6f37482510cfc424049ff0b0369b79e34335 (diff)
parent383853ee92f69c3e4ccadacd34e0f22e1e896345 (diff)
downloadcmd2-git-db093b630ed487838337a04a28af79475d37d1e0.tar.gz
Merge pull request #843 from python-cmd2/ansi_to_style
ansi to style
Diffstat (limited to 'docs/features')
-rw-r--r--docs/features/generating_output.rst12
-rw-r--r--docs/features/settings.rst4
2 files changed, 8 insertions, 8 deletions
diff --git a/docs/features/generating_output.rst b/docs/features/generating_output.rst
index 2ee820f1..e83b5fdf 100644
--- a/docs/features/generating_output.rst
+++ b/docs/features/generating_output.rst
@@ -45,23 +45,23 @@ changing the value of the ``quiet`` setting.
Colored Output
--------------
-The output methods in the previous section all honor the ``allow_ansi``
+The output methods in the previous section all honor the ``allow_style``
setting, which has three possible values:
Never
- poutput(), pfeedback(), and ppaged() strip all ANSI escape sequences
+ poutput(), pfeedback(), and ppaged() strip all ANSI style sequences
which instruct the terminal to colorize output
Terminal
(the default value) poutput(), pfeedback(), and ppaged() do not strip any
- ANSI escape sequences when the output is a terminal, but if the output is a
- pipe or a file the escape sequences are stripped. If you want colorized
- output you must add ANSI escape sequences using either cmd2's internal ansi
+ ANSI style sequences when the output is a terminal, but if the output is a
+ pipe or a file the style sequences are stripped. If you want colorized
+ output you must add ANSI style sequences using either cmd2's internal ansi
module or another color library such as `plumbum.colors`, `colorama`, or
`colored`.
Always
- poutput(), pfeedback(), and ppaged() never strip ANSI escape sequences,
+ poutput(), pfeedback(), and ppaged() never strip ANSI style sequences,
regardless of the output destination
Colored and otherwise styled output can be generated using the `ansi.style()`
diff --git a/docs/features/settings.rst b/docs/features/settings.rst
index b0575468..f305a68c 100644
--- a/docs/features/settings.rst
+++ b/docs/features/settings.rst
@@ -46,7 +46,7 @@ comments, is viewable from within a running application
with::
(Cmd) set --long
- allow_ansi: Terminal # Allow ANSI escape sequences in output (valid values: Terminal, Always, Never)
+ allow_style: Terminal # Allow ANSI text style sequences in output (valid values: Terminal, Always, Never)
continuation_prompt: > # On 2nd+ line of input
debug: False # Show full error stack on error
echo: False # Echo command issued into output
@@ -61,7 +61,7 @@ with::
Any of these user-settable parameters can be set while running your app with
the ``set`` command like so::
- set allow_ansi Never
+ set allow_style Never