Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: DEBUG_CMD_LINE (Was Re: PATCH: skip command from debug trap)
- X-seq: zsh-workers 25417
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Peter Stephenson <pws@xxxxxxx>
- Subject: Re: DEBUG_CMD_LINE (Was Re: PATCH: skip command from debug trap)
- Date: Thu, 7 Aug 2008 11:40:30 +0100
- Cc: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- In-reply-to: <20080807111438.59126ef3@news01>
- Mail-followup-to: Peter Stephenson <pws@xxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <6cd6de210808061419q2a81856cv62969490069e8f3e@xxxxxxxxxxxxxx> <20080807095441.3058605d@news01> <20080807093139.GA6839@xxxxxxxxxxxxxxx> <20080807111438.59126ef3@news01>
On Thu, Aug 07, 2008 at 11:14:38AM +0100, Peter Stephenson wrote:
[...]
> > BTW, shouldn't PROMPT_SUBST be enabled by default in sh and ksh
> > emulation?
>
> If they do that, then presumably yes.
[...]
It's required by SUSv3 for non-priviledged users for systems
supporting the User Portability Utilities option (so include the
sh of Unix conformant systems, but not necessarily POSIX
conformant ones I suppose).
> > Is there a way to run shell code (other than assignments and
> > arithmetic expansion) upon the expansion of PS4? I thought of
> > /(e:code:), but in scalar context I couldn't find a way for
> > globbing to be performed.
>
> I don't see how this differs from the stuff in $(...), which is treated as
> a complete command line. Do you mean you need code to run within
> the current shell?
[...]
Yes, sorry, I forgot the most important part of my sentence,
"without forking a subshell", or as you put it: "within
the current shell" but I suppose it's not easy to determine what
the current shell is when PS4 is expanded (especially in
pipe-lines).
The idea behind it being another way to have a DEBUG trap.
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author