zsh-workers
 help / color / mirror / code / Atom feed
* Incompatibility when Zsh invoked as 'sh'
@ 2002-02-03 23:13 DervishD
  2002-02-04  2:51 ` Dan Nelson
  0 siblings, 1 reply; 6+ messages in thread
From: DervishD @ 2002-02-03 23:13 UTC (permalink / raw)
  To: Zsh

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 891 bytes --]

    Hello zshworkers :))

    I don't know if this is an incompatibility or just bad scripting
;)), but when running the GNU libc (version 2.2.4) 'catchsegv'
script, Zsh complains. Zsh is being invoked as 'sh' here, I'm sure of
it, at least.

    The problem is a 'case' like this (abbreviated):

    case "$1" in
        [*)  ....
            ;;
        *)   ....
            ;;
    esac

    Well, the error is the '[*' pattern, which zsh says is a 'bat
pattern'. Bash treats it as the regex 'match an opening bracket and
anything after it', but zsh doesn't.

    Assuming that zsh is running in 'sh' compatibility mode (because
it is invoked 'sh'), it shouldn't treat '[' as an special character
(the problem is that the bracket must be quoted), should it?

    If Zsh is behaving well, the GNU libc people should be told about
quoting the offending char.

    Thanks a lot :)

    Raúl


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: Incompatibility when Zsh invoked as 'sh'
@ 2002-02-04 10:06 DervishD
  0 siblings, 0 replies; 6+ messages in thread
From: DervishD @ 2002-02-04 10:06 UTC (permalink / raw)
  To: dnelson, raul; +Cc: zsh-workers

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

    Hello Dan :)

>I don't have a link to the new Single Unix spec at the moment; what's
>it say?

    That the '[' introduces a pattern bracket expression. Details are
in the XBD specification (haven't look at it yet).

    Raúl


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: Incompatibility when Zsh invoked as 'sh'
@ 2002-02-04 10:07 DervishD
  0 siblings, 0 replies; 6+ messages in thread
From: DervishD @ 2002-02-04 10:07 UTC (permalink / raw)
  To: dnelson, raul, schaefer, zsh-workers

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 330 bytes --]

    Hello Bart :)

>Nothing in section 9.3.5 allows for an unmatched left-bracket to match a
>literal bracket.  The description of the "case" construct doesn't make
>any exception to this, either.

    That is, the bracket must be closed or quoted. I'll send a bug
report to the GNU libc people.

    Thanks for all :)

    Raúl


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-02-04 10:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-03 23:13 Incompatibility when Zsh invoked as 'sh' DervishD
2002-02-04  2:51 ` Dan Nelson
2002-02-04  3:46   ` Bart Schaefer
2002-02-04 10:14     ` Peter Stephenson
2002-02-04 10:06 DervishD
2002-02-04 10:07 DervishD

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).