pub-solar-os/profiles/develop/zsh/functions/rg
Timothy DeHerrera 6139834a4a
develop#zsh: factor out functions into files
Upgrade the `rg` function to only pipe to `PAGER` when output is a
terminal.
2019-12-15 20:54:11 -07:00

7 lines
129 B
Plaintext

# pipe rg into less with colors
if [[ -t 1 && -n $PAGER ]]; then
@ripgrep@/bin/rg -p $@ | $PAGER
else
@ripgrep@/bin/rg $@
fi