From: Martin Birgmeier <Martin.Birgmeier@aon.at>
To: zsh-workers@math.gatech.edu
Subject: Bug in zsh-3.1.5
Date: Sat, 07 Nov 1998 10:20:52 +0100 [thread overview]
Message-ID: <364410F4.7B138182@aon.at> (raw)
Hi -
First, thanks for a great program!
Now, the bug report: I am using zsh-3.1.5 on FreeBSD 2.2.7. Since zsh-3.1.3, there
is a bug in case statement processing. Relevant output goes here:
$ echo echo "${HOSTTYPE:-$OSTYPE}:${TERM}:${TTY}" <--- informational
freebsd2.2.7:xterm:/dev/ttyp0
$ case a in <--- works
a* | b* )
echo yes
;;
* )
echo no
;;
esac
yes
$ case "${HOSTTYPE:-$OSTYPE}:${TERM}:${TTY}" in <--- works
freebsd*:xterm:* )
echo yes
;;
* )
echo no
;;
case> esac
yes
$ case "${HOSTTYPE:-$OSTYPE}:${TERM}:${TTY}" in <--- DOES NOT WORK
freebsd*:xterm:* | freebsd*:xterms:* )
echo yes
;;
* )
echo no
;;
esac
no
It seems that the second choice of the first case label controls the truth
value of the expression!
$ case "${HOSTTYPE:-$OSTYPE}:${TERM}:${TTY}" in <--- WORKS!
( freebsd*:xterm:* | freebsd*:xterms:* )
echo yes
;;
* )
echo no
;;
esac
yes
The last example shows that the problem must have something to do with
a new allowed syntax for case labels (leading parenthesis). Also, the
first example shows that the case statement is working if patterns are
quite simple.
I hope you can reproduce and fix this problem. I did not include
the output of "reporter" since I am quite confident that you don't
need it. If I am wrong, I'll mail it to you, just let me know.
Please note that I am not on the mailing list.
Best regards,
Martin
--
Martin Birgmeier
Vienna e-mail: Martin.Birgmeier@IEEE.org
Austria Martin.Birgmeier@aon.at
next reply other threads:[~1998-11-07 9:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-07 9:20 Martin Birgmeier [this message]
1998-11-07 17:55 ` Bart Schaefer
1998-11-10 8:59 ` PATCH: Re: Bug in zsh-3.1.5 `case' pattern matching Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=364410F4.7B138182@aon.at \
--to=martin.birgmeier@aon.at \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).