Re: Should the readline *-meta flags reset when $LANG changes?

2022-08-11 Thread Koichi Murase
2022年8月12日(金) 4:22 Chet Ramey : > >> Often enough to make a difference? > > > > My `bind -x' functions use `LC_ALL=' and `LC_CTYPE=C' for every > > keystroke, for example, in combination with `builtin read'. They also > > use `LC_ALL=' for other purposes for mostly every keystroke. Some vi > > bi

Re: Should the readline *-meta flags reset when $LANG changes?

2022-08-11 Thread Chet Ramey
On 8/10/22 10:59 PM, Koichi Murase wrote: 2022年8月10日(水) 23:21 Chet Ramey : Does it mean custom values of these readline variables will be lost every time LANG or LC_{CTYPE,ALL} is changed even if a user or program intentionally sets them up? It means those settings will now mirror the locale.

Re: Arithmetic expression: recursive VAR evaluation suppresses desired VAR assignment

2022-08-11 Thread Steffen Nurpmeso
Robert Elz wrote in <16667.1660234...@jacaranda.noi.kre.to>: |Date:Thu, 11 Aug 2022 16:22:12 +0200 |From:Steffen Nurpmeso |Message-ID: <20220811142212.jhlpj%stef...@sdaoden.eu> | | |||> Hm. Well i agree that precedence rules which loose a construct |||> comple

Re: Arithmetic expression: recursive VAR evaluation suppresses desired VAR assignment

2022-08-11 Thread Steffen Nurpmeso
Chet Ramey wrote in : |On 8/11/22 10:00 AM, Steffen Nurpmeso wrote: |. |> Can you also explain this: |> |>$ bash -c ' I1=I2=10 I2=5 I3=I2+=1; echo "<$(( I1*=1?I1:I3 ))>";echo \ |>"<$I1><$I2><$I3>"' |><100> |><100><10> | |I1 *= 1?I1:I3 |I1 *= I1 |I1 = I1 * I1 |I1 = (I2

Re: Arithmetic expression: recursive VAR evaluation suppresses desired VAR assignment

2022-08-11 Thread Steffen Nurpmeso
Steffen Nurpmeso wrote in <20220811140049.avjlp%stef...@sdaoden.eu>: |Koichi Murase wrote in | : ||2022年8月11日(木) 9:01 Steffen Nurpmeso : ... ||I think both your version and recent versions of busybox sh are broken. It was a one line fix. - while(lprec > a_SHEXP_ARITH_PREC

Re: Arithmetic expression: recursive VAR evaluation suppresses desired VAR assignment

2022-08-11 Thread Robert Elz
Date:Thu, 11 Aug 2022 16:22:12 +0200 From:Steffen Nurpmeso Message-ID: <20220811142212.jhlpj%stef...@sdaoden.eu> | |> Hm. Well i agree that precedence rules which loose a construct | |> completely (in that =5 is lost in I=5?I:J) is weird, but other I seem to

Re: Arithmetic expression: recursive VAR evaluation suppresses desired VAR assignment

2022-08-11 Thread Chet Ramey
On 8/11/22 10:00 AM, Steffen Nurpmeso wrote: . Can you also explain this: $ bash -c ' I1=I2=10 I2=5 I3=I2+=1; echo "<$(( I1*=1?I1:I3 ))>";echo "<$I1><$I2><$I3>"' <100> <100><10> I1 *= 1?I1:I3 I1 *= I1 I1 = I1 * I1 I1 = (I2=10) * (I2=10) I1 = 10 * 10 I1 = 100 Along the way, I2 is set

Re: cut loadable outputs extra newlines

2022-08-11 Thread Chet Ramey
On 8/10/22 4:50 PM, Geir Hauge wrote: Bash Version: 5.2 Patch Level: 0 Release Status: rc3 Description: examples/loadables/cut.c uses zgetline, which includes the newline delimiter in the line it reads, but the rest of the code expects the line to not contain the newline. Thank

Re: Arithmetic expression: recursive VAR evaluation suppresses desired VAR assignment

2022-08-11 Thread Steffen Nurpmeso
Greg Wooledge wrote in : |On Thu, Aug 11, 2022 at 04:04:57PM +0200, Steffen Nurpmeso wrote: |> Hm. Well i agree that precedence rules which loose a construct |> completely (in that =5 is lost in I=5?I:J) is weird, but other | |What's that even supposed to *be*? You're assigning I=5 and then

Re: Arithmetic expression: recursive VAR evaluation suppresses desired VAR assignment

2022-08-11 Thread Greg Wooledge
On Thu, Aug 11, 2022 at 04:04:57PM +0200, Steffen Nurpmeso wrote: > Hm. Well i agree that precedence rules which loose a construct > completely (in that =5 is lost in I=5?I:J) is weird, but other What's that even supposed to *be*? You're assigning I=5 and then checking whether the assignment act

Re: Arithmetic expression: recursive VAR evaluation suppresses desired VAR assignment

2022-08-11 Thread Steffen Nurpmeso
Robert Elz wrote in <26517.1660182...@jacaranda.noi.kre.to>: |I would agree that the values bash is producing don't make a lot |sense, but I don't think you can say that either is correct - one |may be more desirable than the other, but that's it. Hm. Well i agree that precedence rules which

Re: Arithmetic expression: recursive VAR evaluation suppresses desired VAR assignment

2022-08-11 Thread Steffen Nurpmeso
Koichi Murase wrote in : |2022年8月11日(木) 9:01 Steffen Nurpmeso : |> #?0|kent:tmp$ /x/src/busybox.git/busybox sh xxx.sh |> <6><0><6> |> <1><1><5> | |It seems your busybox interprets« I1=0?I1:I3 » as « (I1=0)?I1:I3 », |but this violates POSIX XCU 2.6.4 and XCU 1.1.2. Also, the above Hm.