Bug#514857: zsh -c 'set -e; ! true; echo OK' fails

2016-10-17 Thread Daniel Shahaf
Control: tags -1 -wontfix +fixed-upstream

Fixed upstream as of commit ffa6c76253b9833379893e87e8504eb03b4e954e, to
be included in 5.3.

> On 2009-03-25 16:31:41 +, Peter Stephenson wrote:
> > Clint Adams wrote:
> > > A trio regarding set -e:
> > 
> > I am not going anywhere near this until the clarification in the
> > standard gets through.
> 
> New on the subject (a fix?):
> 
>   http://www.zsh.org/mla/workers/2016/msg02023.html
> 
> -- 
> Vincent Lefèvre  - Web: 
> 100% accessible validated (X)HTML - Blog: 
> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
> 



Bug#514857: zsh -c 'set -e; ! true; echo OK' fails

2016-10-04 Thread Vincent Lefevre
On 2009-03-25 16:31:41 +, Peter Stephenson wrote:
> Clint Adams wrote:
> > A trio regarding set -e:
> 
> I am not going anywhere near this until the clarification in the
> standard gets through.

New on the subject (a fix?):

  http://www.zsh.org/mla/workers/2016/msg02023.html

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#519571: Bug#514857: zsh -c 'set -e; ! true; echo OK' fails

2009-03-25 Thread Peter Stephenson
Clint Adams wrote:
> A trio regarding set -e:

I am not going anywhere near this until the clarification in the
standard gets through.

-- 
Peter Stephenson   Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK  Tel: +44 (0)1223 692070



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#519571: Bug#514857: zsh -c 'set -e; ! true; echo OK' fails

2009-03-25 Thread Clint Adams
A trio regarding set -e:

On Wed, Feb 11, 2009 at 01:34:54PM +0100, Vincent Lefevre wrote:
> The command
> 
>   zsh -c 'set -e; ! true; echo OK'
> 
> fails to output OK, thus does not conform to POSIX:
> 
>-e When this option is on, if a simple command fails for any of the
>   reasons listed in Section 2.8.1 (on page 2315) or returns an exit
>   status value >0, and is not part of the compound list following a
>   while, until, or if keyword, and is not a part of an AND or OR
>   list, and is not a pipeline preceded by the ! reserved word, then
>   the shell shall immediately exit.
> 
> bash, dash and ksh93 are correct (but not pdksh, posh and zsh).
> 
> There's currently a discussion about "set -e" in the austin group
> mailing-list, but there does not seem to be any ambiguity on the
> above point, as only "! true" returns an exit status value >0 but
> this is not a simple command. And concerning historical behavior,
> both ksh93 and bash output OK. So, I think that pdksh, posh and
> zsh should follow.

On Fri, Mar 13, 2009 at 03:51:34PM +0100, Vincent Lefevre wrote:
> According to the new "set -e" proposal
> 
>   http://www.opengroup.org/austin/mailarchives/ag/msg18258.html
> 
> zsh -c 'set -e; ! if true; then false; fi; echo $?'
> 
> should output 0, i.e. "false" should not make the shell exit, because
> it is under a "!" context (even though "!" doesn't apply on the "false"
> command directly).
> 
> Note that every other shell (bash, ksh93, pdksh, dash, posh) output 0.

On Tue, Mar 17, 2009 at 12:46:20PM +0100, Vincent Lefevre wrote:
> POSIX shells (bash, dash, ksh93, pdksh, posh) return with no output
> and an exit status equal to 1 on:
> 
>   sh -c 'set -e; foo() { false && false; }; foo; echo $?'
> 
> but zsh doesn't, even with "emulate sh":
> 
> $ zsh -fc 'emulate sh; set -e; foo() { false && false; }; foo; echo $?'
> 1
> 
> zsh should match the existing practice (perhaps even without
> "emulate sh", unless this can break too many zsh scripts).




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#514857: zsh -c 'set -e; ! true; echo OK' fails

2009-02-11 Thread Vincent Lefevre
Package: zsh
Version: 4.3.9-1
Severity: normal

The command

  zsh -c 'set -e; ! true; echo OK'

fails to output OK, thus does not conform to POSIX:

   -e When this option is on, if a simple command fails for any of the
  reasons listed in Section 2.8.1 (on page 2315) or returns an exit
  status value >0, and is not part of the compound list following a
  while, until, or if keyword, and is not a part of an AND or OR
  list, and is not a pipeline preceded by the ! reserved word, then
  the shell shall immediately exit.

bash, dash and ksh93 are correct (but not pdksh, posh and zsh).

There's currently a discussion about "set -e" in the austin group
mailing-list, but there does not seem to be any ambiguity on the
above point, as only "! true" returns an exit status value >0 but
this is not a simple command. And concerning historical behavior,
both ksh93 and bash output OK. So, I think that pdksh, posh and
zsh should follow.

Also the bug seems to be already accepted for pdksh:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=387755

-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26.5-20080922 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages zsh depends on:
ii  libc6 2.7-18 GNU C Library: Shared libraries
ii  libcap2   2.11-2 support for getting/setting POSIX.
ii  libncursesw5  5.7+20090124-1 shared libraries for terminal hand

Versions of packages zsh recommends:
ii  libpcre3  7.8-2  Perl 5 Compatible Regular Expressi

Versions of packages zsh suggests:
ii  zsh-doc   4.3.9-1zsh documentation - info/HTML form

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org