Re: Regression with declare -i and arrays

2015-04-03 Thread Eduardo Bustamante
Nevermind. The patch is wrong, but at least it shows where the problem is (if needs braces, around line 529) El abr 3, 2015 8:48 PM, "Eduardo A. Bustamante López" escribió: > Here's a patch: > > > diff --git a/builtins/declare.def b/builtins/declare.def > index 5ed83a0..f0f9a6d 100644 > --- a/bui

Re: Regression with declare -i and arrays

2015-04-03 Thread Eduardo A . Bustamante López
Here's a patch: diff --git a/builtins/declare.def b/builtins/declare.def index 5ed83a0..f0f9a6d 100644 --- a/builtins/declare.def +++ b/builtins/declare.def @@ -280,7 +280,7 @@ declare_internal (list, local_var) return (sh_chkwrite (any_failed ? EXECUTION_FAILURE : EXECUTION_SUCCESS));

Regression with declare -i and arrays

2015-04-03 Thread Eduardo A . Bustamante López
Hello Chet, You introduced a regression: [dual...@ma.sdf.org /tmp/tmp.ps6HXrLSZX/devel-]$ ./bash -c 'typeset -i x; x=([0]=1+1); echo "$x"' 1+1 vs dualbus@yaqui ~ % bash -c 'typeset -i x; x=([0]=1+1); echo "$x"' 2 The regression was introduced here: 06c3a57511953d09ac9ea262bc18bfdbcff23fc4 T

Re: Sourcing a file ending in \ disables aliases for 1 command

2015-04-03 Thread Pedro Gimeno
John McKown wrote, On 2015-04-03 14:19: > Note that testbug.sh does end in a LF, at least if I did it correctly. I've noticed that actually the LF is not important, only the final backslash is: $ alias hi=echo\ hello Without final LF: $ echo -n true\\ > testbug.sh $ . testbug.sh $ hi bash: hi:

Re: Sourcing a file ending in \ disables aliases for 1 command

2015-04-03 Thread Eduardo A . Bustamante López
I'm replying to this report, because it's the latest. This seems to be caused by last_read_token having an incorrect value set. `alias_expand_token' in parse.y relies on `command_token_position (last_read_token)' (and parser_state), to determine if an alias expansion should be performed. The corr

Re: Sourcing a file ending in \ disables aliases for 1 command

2015-04-03 Thread John McKown
On Thu, Apr 2, 2015 at 4:40 PM, Pedro Gimeno wrote: > Bash Version: 4.2 > Patch Level: 37 > Release Status: release > > Description: > If a file with a command that ends in \ is sourced, the next > command issued in the command line does not interpret aliases but > subsequent ones do. It's

Sourcing a file ending in \ disables aliases for 1 command

2015-04-03 Thread Pedro Gimeno
Bash Version: 4.2 Patch Level: 37 Release Status: release Description: If a file with a command that ends in \ is sourced, the next command issued in the command line does not interpret aliases but subsequent ones do. It's a minor issue easy to work around, but since it's surprising behavi

Sourcing a file ending in \ disables aliases for 1 command

2015-04-03 Thread Pedro Gimeno
Bash Version: 4.2 Patch Level: 37 Release Status: release Description: If a file with a command that ends in \ is sourced, the next command issued in the command line does not interpret aliases but subsequent ones do. It's a minor issue easy to work around, but since it's surprising behavi