From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id PAA06387 for ; Sun, 10 Sep 1995 15:48:30 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA00119 (5.65c/Gatech-10.0-IDA for ); Sun, 10 Sep 1995 01:49:32 -0400 Received: by math (5.x/SMI-SVR4) id AA04850; Sun, 10 Sep 1995 01:43:41 -0400 Old-Return-Path: Resent-Date: Sun, 10 Sep 1995 01:45:37 -0400 Old-Return-Path: From: cross@va.pubnix.com (Chris P. Ross) Date: Sun, 10 Sep 1995 01:45:37 -0400 Message-Id: To: Laurent Wacrenier Cc: luomat@cedman.remote.Princeton.EDU, zsh-users@math.gatech.edu Subject: Re: checking if in interactive shell In-Reply-To: Laurent Wacrenier's message of Sun, 10 September 1995 04:34:01 +0200 <199509100234.EAA02808@DAEC.ObsPM.Fr> References: <199509100234.EAA02808@DAEC.ObsPM.Fr> Resent-Message-Id: <"S9FoC2.0.TB1.7idKm"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/84 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Laurent Wacrenier said: >> Ok, in csh I'd check for interactive shell via this: > [ csh code deleted :] >> how do I do this in zsh? > I would do it like this : > case "$-" in > *i*) interactive ;; > *) not interactive ;; > esac Doh! What's wrong with: if [[ -o interactive ]]; then # We're interactive! fi > -- Laurent - Chris