[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shopt to change default connector to '&&'
From: |
Hugues Morisset |
Subject: |
Re: Shopt to change default connector to '&&' |
Date: |
Sat, 11 Mar 2023 09:43:15 +0100 |
> Firstly, "devel" is the development branch, so potential contributions
> should be based off of that.
> Secondly, the patch does apply to the master branch but is not
> usable as-is. It modifies configure.in, which has not been touched
> in over 11 years and is ignored by recent versions of autoconf in
> favor of configure.ac. After applying your changes to configure.ac
> by hand and regenerating configure, the resulting bash recognizes
> the default_connector_and_and shopt but otherwise does not seem to
> behave differently.
Thanks a lots for the instructions, I'll fix the patch when I get some time.
An very simple example you can try is
foo() {
false
echo foo
}
bar() {
echo bar
}
foo || bar
which print foo but with default_connector_and_and on it will print bar.
If would write foo() more explicitly when the shopt is on it would be
foo() {
false \
&& echo foo
}
On Fri, Mar 10, 2023 at 7:57 PM Lawrence Velázquez <vq@larryv.me> wrote:
> I'm not the bash maintainer, so apologies in advance if the following
> is off-base in some way.
>
> On Fri, Mar 10, 2023, at 3:03 AM, Hugues Morisset wrote:
> > It should applies on top of bash 5.2 release
>
> Firstly, "devel" is the development branch, so potential contributions
> should be based off of that.
>
> Secondly, the patch does apply to the master branch but is not
> usable as-is. It modifies configure.in, which has not been touched
> in over 11 years and is ignored by recent versions of autoconf in
> favor of configure.ac. After applying your changes to configure.ac
> by hand and regenerating configure, the resulting bash recognizes
> the default_connector_and_and shopt but otherwise does not seem to
> behave differently.
>
> --
> vq
>