From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Dan Jacobson Newsgroups: gmane.emacs.bugs,gmane.comp.shells.bash.bugs,gmane.comp.gnu.core-utils.bugs Subject: test -t FD vs. [FD] Date: Thu, 19 Jun 2003 04:47:44 +0800 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87r85rm7tb.fsf_-_@jidanni.org> References: <87y901unqy.fsf@jidanni.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1055973322 23159 80.91.224.249 (18 Jun 2003 21:55:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 18 Jun 2003 21:55:22 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 18 23:55:20 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19SktE-0005yB-00 for ; Wed, 18 Jun 2003 23:54:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19SksC-0001xU-6P for gnu-bug-gnu-emacs@m.gmane.org; Wed, 18 Jun 2003 17:53:44 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19SkoH-0000wE-3Z for bug-gnu-emacs@gnu.org; Wed, 18 Jun 2003 17:49:41 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19Skne-0000cn-5T for bug-gnu-emacs@gnu.org; Wed, 18 Jun 2003 17:49:03 -0400 Original-Received: from tx.symonds.net ([64.246.28.87]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Skj5-0007cM-Gm; Wed, 18 Jun 2003 17:44:19 -0400 Original-Received: from tc218-187-73-215.2-3.pl.apol.com.tw ([218.187.73.215] helo=jidanni.org) by tx.symonds.net with asmtp (Exim 4.04) id 19Skj1-0007EA-00; Wed, 18 Jun 2003 17:44:19 -0400 Original-Received: from jidanni by jidanni.org with local (Exim 3.36 #1 (Debian)) id 19SjqK-0003HH-00; Thu, 19 Jun 2003 04:47:44 +0800 Original-To: bug-bash@gnu.org,bug-coreutils@gnu.org,bug-gnu-emacs@gnu.org In-Reply-To: (prj@po.cwru.edu's message of "Tue, 17 Jun 2003 18:34:00 -0400") User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5335 gmane.comp.shells.bash.bugs:2217 gmane.comp.gnu.core-utils.bugs:569 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5335 [remove emacs group when following up] >> Why does (shell-command "test -t&&tty") get so far to tell me 'not a >> tty'!? Paul> With a single argument, test only tells you whether that arguments is Paul> empty. You want "test -t 0" (or 1 or 2). $ man test -t [FD] file descriptor FD (stdout by default) is opened on a terminal I.e. argument optional $ help test -t FD True if FD is opened on a terminal. Not so optional with bash then. You guys should unify them. >> Wait, (shell-command "/usr/bin/test -t&&tty") doesn't get that >> far, good. Paul> Looks like /usr/bin/test is buggy.