diff --git a/README.md b/README.md index cf3bb15..668be51 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,12 @@ either the `dark` or the `light` style for you. glow -s [dark|light] ``` +For piped output, use `--color=always` to keep colorized output even when stdout is not a terminal. + +```bash +glow --color=always +``` + Alternatively you can also supply a custom JSON stylesheet: ```bash @@ -201,6 +207,8 @@ Here's an example config: ```yaml # style name or JSON path (default "auto") style: "light" +# colorize output when piped (auto|always) +color: "auto" # mouse wheel support (TUI-mode only) mouse: true # use pager to display markdown diff --git a/config_cmd.go b/config_cmd.go index 390a1db..2e6c874 100644 --- a/config_cmd.go +++ b/config_cmd.go @@ -15,6 +15,8 @@ import ( const defaultConfig = `# style name or JSON path (default "auto") style: "auto" +# colorize output when piped (auto|always) +color: "auto" # mouse support (TUI-mode only) mouse: false # use pager to display markdown