Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: preventing the leading space in process substitution
- X-seq: zsh-workers 25646
- From: Peter Stephenson <pws@xxxxxxx>
- To: "Zsh Hackers' List" <zsh-workers@xxxxxxxxxx>
- Subject: Re: preventing the leading space in process substitution
- Date: Thu, 11 Sep 2008 15:54:16 +0100
- In-reply-to: <080911073531.ZM24010@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: CSR
- References: <20080909144101.GA30693@xxxxxxxxxxxxxxxxxxxx> <200809101124.m8ABOlKI005063@xxxxxxxxxxxxxx> <080910074842.ZM19151@xxxxxxxxxxxxxxxxxxxxxx> <200809101510.m8AFAajX007203@xxxxxxxxxxxxxx> <080910090554.ZM19272@xxxxxxxxxxxxxxxxxxxxxx> <6cd6de210809101151q4d0a2a35p452fe656e0ee7dd5@xxxxxxxxxxxxxx> <20080911130005.7c5e2b7c@news01> <6cd6de210809110544u569838dk5a93a739fa267822@xxxxxxxxxxxxxx> <20080911140505.6c040bf4@news01> <080911073531.ZM24010@xxxxxxxxxxxxxxxxxxxxxx>
On Thu, 11 Sep 2008 07:35:31 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> } I can't see why we shouldn't keep the debug-related traps, ZERR and
> } DEBUG, alive in subshells.
>
> I can't think of any reason either, unless maybe there are cases where
> it could result in the trap being executed in both the subshell and
> the parent.
Shouldn't normally happen, but I suppose we'll just have to see. I've
committed the patch.
That's to say, "(echo foo)" causes a DEBUG trap for the (...) itself, and
then a DEBUG trap for any contents inside the subshell according to the
normal rules for a list of commands, but I think that's exactly what we
want (it's the same as for {...}).
I note that $ZSH_DEBUG_CMD has strange (overlarge) indentation for the
elements of (...) after the opening parenthesis. I think that needs
revisiting. I don't quite understand why the default indentation is 1
instead of 0; obviously that's right for outputting the bodies of
functions, but the code has many other uses.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author