From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19211 invoked from network); 9 Feb 1997 22:51:25 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 9 Feb 1997 22:51:25 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id RAA05401; Sun, 9 Feb 1997 17:44:08 -0500 (EST) Resent-Date: Sun, 9 Feb 1997 17:44:08 -0500 (EST) Date: Sun, 9 Feb 1997 23:45:38 +0100 (MET) From: "C. v. Stuckrad" X-Sender: stucki@petzval Reply-To: "C. v. Stuckrad" To: Zsh hackers list cc: Daniel Dignam , Peter Stephenson Subject: ((Re: set -vx changes output of)) subshells In-Reply-To: <32F8A824.167E@UG.EDS.COM> Message-ID: X-TestHeaderA: Written by C. v. Stuckrad; FB. Mathematik; EDV X-TestHeaderB: FU-Berlin; Arnimallee 2-6; 14195 Berlin; GERMANY Priority: normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Resent-Message-ID: <"9BwO72.0.HK1.tCb_o"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2882 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Wed, 5 Feb 1997, Daniel Dignam wrote: > My assumption was that the set -vx didn't get inherited by the > subshells, but my understanding would appear to be false, I guess $() > isn't really a subshell ... Well, This reminds me of a question I never could get solved so far: How, if it is at all possible, can a $(...) subshell or the inside of a construct 'know' that is not '*THE* interactive' shell ? Simple but irritating (for me) exammple: Assume you make a function 'xswt' which sets Window titles in X11-Xterms. Then you include 'xswt' inside of chpwd, so it gets executed at every 'cd' and so the title can show the current directory. -- ok so far. NOW you use something like: - to make a crude comparison of two directories: ls $(cd somwhere; ls) - to make something in a tree: for i in $(locate subdirs) do ( cd $i; make ) done In both cases you end up with the wrong title and in the second case with 'blinking' the title through all dirs. As there is no 'falling back'-function after the sub-shell does 'cd' there is no chance to set the title BACK, but ??? Is there a chance to AUTOMATICALLY NOT set the title ??? (which means 'automatically not to execute chpwd' or somehow tell a shell it is a subshell or a construct or function) I know that this look like the request for a mindreader 'do_what_I_think' function, but may be I overlook something simple ... Stucki Christoph von Stuckrad * * | talk to | \ Freie Universitaet Berlin |/_* | nickname | ...!unido!fub!leibniz!stucki| Fachbereich Mathematik, EDV |\ * | 'stucki' | Tel:+49 30 838-7545{9|8} | Arnimallee 2-6/14195 Berlin * * | on IRC | Fax:+49 30 838-5913 /