Can we have a command to do a return completely (as if it returns from
main function) when it is being in a third nested function call, in
order to get back to shell prompt at once, in normal, ie. not
subshell?
My main function invocation here will fully shut down terminal if exit
command is given
On 12/14/20 4:45 AM, Oğuz wrote:
$ Y+='($foo 3)'
$ declare -p Y
declare -A Y=([0]="(\$foo 3)" ["1 2"]="3" )
Where did the 0 come from?
That's a scalar assignment. You quoted the parens so it can't be a compound
assignment. Since the variable is an array, and an assignment was
On Mon, Dec 14, 2020 at 11:00 AM felix wrote:
> On Fri, Dec 11, 2020 at 03:08:04PM +0300, Oğuz wrote:
> > I was trying the new features of bash 5.1 and came across this
> inconsistent
> > behavior:
> >
> > $ foo='1 2'
> > $ declare -A bar=($foo 3)
> > $ declare -p bar
> > declare
On Fri, Dec 11, 2020 at 03:08:04PM +0300, Oğuz wrote:
> I was trying the new features of bash 5.1 and came across this inconsistent
> behavior:
>
> $ foo='1 2'
> $ declare -A bar=($foo 3)
> $ declare -p bar
> declare -A bar=(["\$foo"]="3" )
> $
> $ bar+=($foo 3)
> $ dec