Laurent Picquet writes:
> Should the 'local' command be the one able to detect that the assignment to
> the variable had an non-zero exit code and return the non-zero exit code?
John Passaro writes:
> I think the underlying question here is not exactly "how do I gather this
> from the docs" as m
On Sun, May 31, 2020 at 11:57:03PM -0400, John Passaro wrote:
> I think the underlying question here is not exactly "how do I gather this
> from the docs" as much as it is "how was I supposed to know about this and
> act on it before I had to debug it?"
I don't believe the bash documentation is th
I think the underlying question here is not exactly "how do I gather this
from the docs" as much as it is "how was I supposed to know about this and
act on it before I had to debug it?" The bash manual is always "adequate"
in the sense that almost any question can be answered by carefully
consultin
Date:Sun, 31 May 2020 10:29:27 +0100
From:Laurent Picquet
Message-ID:
| This behaviour is not fully documented
Nothing is ever "fully" documented, as it is always possible to
write even more text about anything at all - and if that were done
then it is clear that
On Sun, May 31, 2020 at 5:22 PM Oğuz wrote:
> 31 Mayıs 2020 Pazar tarihinde Laurent Picquet yazdı:
>
> > Ok, thanks for the clarification.
> >
> > This behaviour is not fully documented and I believe this should be
> > addressed.
> >
> >
> I think it is very well documented in the Simple Command
31 Mayıs 2020 Pazar tarihinde Laurent Picquet yazdı:
> Ok, thanks for the clarification.
>
> This behaviour is not fully documented and I believe this should be
> addressed.
>
>
I think it is very well documented in the Simple Command Expansion section
of the manual (
https://www.gnu.org/software
Ok, thanks for the clarification.
This behaviour is not fully documented and I believe this should be
addressed.
I don't mind participating. Could you point me in the right direction to do
that and raise a pull request?
Regards,
Laurent
On Sat, 30 May 2020, 16:32 Oğuz, wrote:
>
>
> 30 Mayıs 2
30 Mayıs 2020 Cumartesi tarihinde Laurent Picquet
yazdı:
> Hello Dale,
>
> This is really interesting.
> Should the 'local' command be the one able to detect that the assignment to
> the variable had an non-zero exit code and return the non-zero exit code?
>
> as a developer, it is counter-intuit
Hello Dale,
This is really interesting.
Should the 'local' command be the one able to detect that the assignment to
the variable had an non-zero exit code and return the non-zero exit code?
as a developer, it is counter-intuitive that the 'local' command tells us
everything is ok when it wasn't.
It's a subtle point. See this paragraph in the bash manual page:
If there is a command name left after expansion, execution
proceeds as described below. Otherwise, the command exits. If
one of the expansions contained a command substitution, the exit
status of the co
On Thu, May 28, 2020 at 08:02:18AM +0100, Laurent Picquet wrote:
> function aFunction {
> local aVar="$(somethingThatFails)" || { echo "is expected to go there";
> return 1; }
> }
"local" is a command with its own separate exit status. It masks
the exit status of the command substitution.
Ru
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE
12 matches
Mail list logo