axiros / terminal_markdown_viewer

Styled Terminal Markdown Viewer
Other
1.81k stars 106 forks source link

mdv doesn't output color codes when stdout is not a terminal #73

Open bool3max opened 5 years ago

bool3max commented 5 years ago

Running latest mdv on latest stable python3.

When stdout is not a terminal, mdv doesn't output color codes, causing watch to not output color. (despite it being ran with --color/-c).

e.g. :

watch --color -n 3 'mdv -t 960.847 test.md' will result in watch's output being colorless, whereas just running the same mdv command inside the shell normally causes it to produce colored output.