Change example in README to only pygmentize when on a TTY

This commit is contained in:
s3lph 2020-11-23 20:52:38 +01:00
parent 61823cd270
commit 18ecc98014

View file

@ -18,7 +18,11 @@ Put something like this in your shell's config, e.g. `.bashrc`, `.zshrc`, or wha
```bash
function dig() {
/usr/bin/dig $@ | pygmentize -xl path/to/dig-lexer.py -Ostyle=monokai
if [[ -t 1 || "$DIG_COLOR" == "always" ]]; then
/usr/bin/dig $@ | pygmentize -F tokenmerge -xl path/to/dig-lexer.py -Ostyle=monokai
else
/usr/bin/dig $@
fi
}
```