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 25419
- From: "Rocky Bernstein" <rocky.bernstein@xxxxxxxxx>
- To: "Zsh hackers list" <zsh-workers@xxxxxxxxxx>
- Subject: Re: DEBUG_CMD_LINE (Was Re: PATCH: skip command from debug trap)
- Date: Thu, 7 Aug 2008 09:37:28 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=IX+fNvfcOnLHxB7LY/Ka2X3mdthh8EFiSWqVnGyjT98=; b=x3Lv2vwbahHAHP7j6U1ED/Z3lPXTv4hyDWR1sEzWXXtVO0gKZiX4VsrcPnMxe0Ihbn VjUtVy5tVJJB5JTmbQ8B2PJ/PVg9IZzb/paYC3/Cm9pQeqKyjFuqhT0SBPdr0bvN/ZVX A1ap2q2lb9D/pv05UBi1+xsYrKPWqslRQBAO4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=A0/U90EG8/35tDqWI40LNzbu6kjbQEjAnqtjja9hsMIZUc+N0QxhJh5WFd6aS9Mkya 6IlnCOoZoEQKy6j1yQt7niISDAne2BHTMfALGCgpMjDOJOe93FWz3w8FPoAxjXdiMyVe 2bT3jjQ9+aVUc0OmUAWaFtP3Obk3HGxXdo4+s=
- In-reply-to: <20080807130656.34179090@news01>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <6cd6de210808061419q2a81856cv62969490069e8f3e@xxxxxxxxxxxxxx> <20080807095441.3058605d@news01> <20080807093139.GA6839@xxxxxxxxxxxxxxx> <20080807111438.59126ef3@news01> <20080807104030.GA7373@xxxxxxxxxxxxxxx> <20080807130656.34179090@news01>
On Thu, Aug 7, 2008 at 8:06 AM, Peter Stephenson <pws@xxxxxxx> wrote:
> On Thu, 7 Aug 2008 11:40:30 +0100
> Stephane Chazelas <Stephane_Chazelas@xxxxxxxx> wrote:
>> 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).
>
> Looks like it's already set up for ksh. It should probably be turned on
> for other Bourne-style shells. I suppose it wasn't done originally because
> at the time that meant old-fashioned, fairly limited Bourne shells, but
> nowadays it doesn't. "promptvars" is on by default in bash.
Perhaps it is time to change the default in zsh as well. I don't think
it ikely someone sets PS4 with backticks and $() and so on and
expects to see exactly those strings in trace output.
However if older zsh compatibility is a concern here, the usual thing
to do is warn that the option is changing, and after a release or so
make the change.
>
> Index: Doc/Zsh/options.yo
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Doc/Zsh/options.yo,v
> retrieving revision 1.61
> diff -u -r1.61 options.yo
> --- Doc/Zsh/options.yo 12 Jun 2008 13:45:05 -0000 1.61
> +++ Doc/Zsh/options.yo 7 Aug 2008 12:04:46 -0000
> @@ -1009,7 +1009,7 @@
> )
> pindex(PROMPT_SUBST)
> cindex(prompt, parameter expansion)
> -item(tt(PROMPT_SUBST) <K>)(
> +item(tt(PROMPT_SUBST) <K> <S>)(
> If set, em(parameter expansion), em(command substitution) and
> em(arithmetic expansion) are performed in prompts. Substitutions
> within prompts do not affect the command status.
> Index: Src/options.c
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Src/options.c,v
> retrieving revision 1.43
> diff -u -r1.43 options.c
> --- Src/options.c 31 Jul 2008 08:44:21 -0000 1.43
> +++ Src/options.c 7 Aug 2008 12:04:47 -0000
> @@ -198,7 +198,7 @@
> {{NULL, "promptcr", OPT_ALL}, PROMPTCR},
> {{NULL, "promptpercent", OPT_NONBOURNE}, PROMPTPERCENT},
> {{NULL, "promptsp", OPT_ALL}, PROMPTSP},
> -{{NULL, "promptsubst", OPT_KSH}, PROMPTSUBST},
> +{{NULL, "promptsubst", OPT_BOURNE}, PROMPTSUBST},
> {{NULL, "pushdignoredups", OPT_EMULATE}, PUSHDIGNOREDUPS},
> {{NULL, "pushdminus", OPT_EMULATE}, PUSHDMINUS},
> {{NULL, "pushdsilent", 0}, PUSHDSILENT},
>
> --
> 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