From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id JAA00723 for ; Fri, 6 Sep 1996 09:30:19 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id TAA02034; Thu, 5 Sep 1996 19:27:23 -0400 (EDT) Resent-Date: Thu, 5 Sep 1996 19:27:23 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960905162314.ZM11373@admin.diego.netmanage.com> Date: Thu, 5 Sep 1996 16:23:13 -0700 In-Reply-To: "C. v. Stuckrad" "HOW TO distiguish between command input and forked subshell ?" (Sep 6, 12:47am) References: X-Mailer: Z-Mail (4.0b.729 29jul96) To: "C. v. Stuckrad" Subject: Re: HOW TO distiguish between command input and forked subshell ? Cc: Zsh workers list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"4yi312.0.iV.R7sBo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2109 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Sep 6, 12:47am, C. v. Stuckrad wrote: > Subject: HOW TO distiguish between command input and forked subshell ? > > Hi! (again :-) You should be asking these questions on zsh-users rather than zsh-workers. They don't have much to do with zsh development or build problems. Not that it would matter much, since everybody on zsh-workers also gets zsh-users, but some people might be filtering based on the To: address. > Exactly, I want to have the function 'chpwd' give some output > if triggered by 'cd' or 'chdir' BUT TO GIVE NO OUTPUT > if triggered by cases like '... $(cd somewhere; ls)...' > > Might that be possible ? chpwd() { if [[ -t 1 ]] then print By golly, my standard output is a terminal. fi }