lkml.org 
[lkml]   [1999]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Linux Makefile uses 'ls', causes problems with color-ls (PATCH)
From
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.113 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site