garabik/grc

Don't require STDIN STDOUT to be tty

HaleTom opened this issue · 0 comments

I have a loop which reads a list of files to source from stdin, and redirects output to an error file.

As such, tty -s will be false for me.

Please change:

if tty -s && [ -n "$TERM" ] && [ "$TERM" != dumb ] && [ -n "$GRC" ]; then       

to:

if [ -n "PS1" ] && [ -n "$TERM" ] && [ "$TERM" != dumb ] && [ -n "$GRC" ]; then