|> Horst von Brand wrote:
|>
|> > I've got an alias for ls that just puts color iff the output
|> > is a tty.
|>
|> It's actually worthwhile protecting a lot of shell settings
|> like that. The bash `noclobber' option also breaks a
|> significant number of shell scripts, including those that
|> start X.
|>
|> # Interactive options
|> if tty -s
This does not detect an interactive shell, it will still be true in a
non-interactive shell if the input doesn't happen to be redirected. The
correct test for interactive shell is to see whether PS1 is set.
-- Andreas Schwab "And now for something schwab@issan.cs.uni-dortmund.de completely different" schwab@gnu.org- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/