Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Substitution Bug (Was: Correction Bug in Beta 17)



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




Messages sorted by: Reverse Date, Date, Thread, Author