Messages in this thread | | | Subject | Re: Linux Makefile uses 'ls', causes problems with color-ls (PATCH) | From | Andreas Schwab <> | Date | 31 Mar 1999 11:52:58 +0200 |
| |
Glen Turner <glen.turner@adelaide.edu.au> writes:
|> 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/
| |