Re: [Fish-users] How to exit on error (bash set -e)

2013-11-13 Thread Maurizio De Santis
I like this proposal -- Maurizio De Santis 2013/11/13 Alex Boisvert > A simple proposal would be to add the "-e" option (fail on error) to fish > 2.2.x so we can start testing + provide feedback on the feature. > > In 3.x, the default behavior would change to fail-on-error. An > environmen

Re: [Fish-users] How to exit on error (bash set -e)

2013-11-13 Thread Alex Boisvert
A simple proposal would be to add the "-e" option (fail on error) to fish 2.2.x so we can start testing + provide feedback on the feature. In 3.x, the default behavior would change to fail-on-error. An environment variable (FISH_FAIL_ON_ERROR=0 ?) could be used to override the default behavior

Re: [Fish-users] How to exit on error (bash set -e)

2013-11-12 Thread Martin Bähr
On Wed, Nov 13, 2013 at 10:49:24AM +0800, David Adam wrote: > > I also think ignoring errors should be explicit; the default should be > > exit-on-failure (though I'll understand that it might be too late to change > > due to backward compatibility) > It would definitely have to wait for a new majo

Re: [Fish-users] How to exit on error (bash set -e)

2013-11-12 Thread David Adam
> On Sun, Nov 10, 2013 at 8:35 AM, Martin Bähr < > mba...@email.archlab.tuwien.ac.at> wrote: > > On Sun, Nov 10, 2013 at 09:09:26PM +0800, David Adam wrote: > > > I suppose the argument could be made that error handling should be > > > explicit. > > > > hmm, from a programmers perspective, most sen

Re: [Fish-users] How to exit on error (bash set -e)

2013-11-10 Thread Alex Boisvert
I also think ignoring errors should be explicit; the default should be exit-on-failure (though I'll understand that it might be too late to change due to backward compatibility) On Sun, Nov 10, 2013 at 8:35 AM, Martin Bähr < mba...@email.archlab.tuwien.ac.at> wrote: > On Sun, Nov 10, 2013 at 09:

Re: [Fish-users] How to exit on error (bash set -e)

2013-11-10 Thread Martin Bähr
On Sun, Nov 10, 2013 at 09:09:26PM +0800, David Adam wrote: > > What is the equivalent of Bash set -e on Fish? > I don't think we have it, as such. You would have to use `; or exit 1` > after lines you are worried about, or check $status. > > I suppose the argument could be made that error handli

Re: [Fish-users] How to exit on error (bash set -e)

2013-11-10 Thread David Adam
On Sat, 9 Nov 2013, Maurizio De Santis wrote: > On bash you can use set -e inside a script in order to exit on error: > > set -e > cd unexisting-folder > echo "this line will never be printed" > > But on fish shell set -e is used to erase variables: > > set FOO barset -e FOO > echo {$FOO} # prin

[Fish-users] How to exit on error (bash set -e)

2013-11-09 Thread Maurizio De Santis
On bash you can use set -e inside a script in order to exit on error: set -e cd unexisting-folder echo "this line will never be printed" But on fish shell set -e is used to erase variables: set FOO barset -e FOO echo {$FOO} # prints newline What is the equivalent of Bash set -e on Fish? -- Mau