Change example in README to only pygmentize when on a TTY
This commit is contained in:
parent
61823cd270
commit
18ecc98014
1 changed files with 5 additions and 1 deletions
|
@ -18,7 +18,11 @@ Put something like this in your shell's config, e.g. `.bashrc`, `.zshrc`, or wha
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
function dig() {
|
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
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue