Re: [PATCH v2 2/2] git-am: minor cleanups
- From
Jay Soffian <jaysoffian@gmail.com>
- Date
- Jan 28, 2009, 14:26 UTC
- Message-ID
- <76718490901280626j2caa6ebbgf98c76d8419191c7@mail.gmail.com>
- In-Reply-To
- <7vd4e8xdva.fsf@gitster.siamese.dyndns.org>
On Tue, Jan 27, 2009 at 11:18 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 6 quoted lines
> Jay Soffian <jaysoffian@gmail.com> writes: > >> Use "test -t 0" instead of deprecated "tty -s" to detect when stdin is a >> terminal. > > Who deprecated it?
I believe it's IEEE Std 1003.2-1992 / POSIX.2. I found the initial reference in the BSD/OS X man page[1], but google also found me other references [2,3]. Also, elsewhere git uses "test -t 0", not "tty -s".
[1] http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man1/tty.1.html
(The -s option is deprecated in favor of the ``test -t 0'' command.)
[2] http://docs.sun.com/app/docs/doc/816-5165/tty-1?a=view
(Portable applications should use test -t.)
[3] http://opengroup.org/onlinepubs/007908799/xcu/tty.html
(Portable applications should use test -t 0.)j.