Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
((Re: set -vx changes output of)) subshells
- X-seq: zsh-workers 2882
- From: "C. v. Stuckrad" <stucki@xxxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxxxxxxx>
- Subject: ((Re: set -vx changes output of)) subshells
- Date: Sun, 9 Feb 1997 23:45:38 +0100 (MET)
- Cc: Daniel Dignam <daniel@xxxxxxxxxx>, Peter Stephenson <pws@xxxxxx>
- In-reply-to: <32F8A824.167E@xxxxxxxxxx>
- Priority: normal
- Reply-to: "C. v. Stuckrad" <stucki@xxxxxxxxxxxxxxxxx>
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 | <stucki@xxxxxxxxxxxxxxxxx> \
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 /
Messages sorted by:
Reverse Date,
Date,
Thread,
Author