From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id KAA18402 for ; Thu, 9 May 1996 10:59:09 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id UAA22404; Wed, 8 May 1996 20:53:15 -0400 (EDT) Resent-Date: Wed, 8 May 1996 20:53:15 -0400 (EDT) Message-Id: <9605090052.AA09133@marathon.cs.ucla.edu> To: zsh-workers@math.gatech.edu Subject: Substitution Bug (Was: Correction Bug in Beta 17) Date: Wed, 08 May 1996 17:52:29 -0700 From: Eskandar Ensafi Resent-Message-ID: <"1qQ451.0.xT5.w7Kan"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1032 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hello, On Thu, 09 May 1996 00:28:19 +0200, Zoltan Hidvegi wrote: > EE> With the PROMPT_SUBST option set [...], the spelling correction > EE> prompt is totally messed up, and two bogus error messages are produced: > [...] > This is not a bug. And the error messages are correct. [...] OK, thanks! I understand now. I did not realize that PROMPT_SUBST also applied to `...` command substitutions. > If you tund on GLOB_SUBST, zsh will try to expand it so interprets ` as > command substitution. Can you please clarify? I tried turning GLOB_SUBST on and off and there was _no_ difference. But why should their be? The backquote ` is not a globbing character, so it it should not be affected bu this option; but it _is_ a substitution character, so PROMPT_SUBST *does* affect it. Right? However, there seems to be some instability in beta17 with respect to handling "bad" prompts when PROMPT_SUBST is turned on. The following eventually caused zsh to crash: (gdb) run % PROMPT=\'\` zsh: parse error in command substitution ' zsh: parse error in command substitution 'PROMPT=\`\' zsh: unmatched ' zsh: parse error in command substitution zsh: unmatched ' zsh: parse error in command substitution PROMPT=\'\`\' zsh: unmatched ' zsh: parse error in command substitution ' zsh: unmatched ' zsh: parse error in command substitution ' Program generated(1): Memory access exception on address 0x9c000 (invalid address). 0x25e7c in stringsubst () (gdb) where #0 0x25e7c in stringsubst () #1 0x25cc2 in prefork () #2 0x26172 in singsub () #3 0x340e0 in putpromptchar () #4 0x33ff0 in putprompt () #5 0x37ebc in genprompts () #6 0x30950 in zleread () #7 0x1a25a in inputline () #8 0x1a17a in ingetc () #9 0x16698 in hgetc () #10 0x1c570 in gettok () #11 0x1c1a0 in yylex () #12 0x2328c in parse_event () #13 0x18a6a in loop () #14 0x1898a in main () Later, - Eskandar