Re: read -N and UTF-8 characters

2017-04-08 Thread Chet Ramey
On 4/6/17 10:15 AM, Stephane Chazelas wrote: > Using "read -N" on text containing multi-byte characters > produces incorrect result. Thanks for the report. This will be fixed in the next devel branch push. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars lon

Re: another case from the case corner case casualty case files

2017-04-08 Thread Chet Ramey
On 4/2/17 8:34 PM, Martijn Dekker wrote: > $ x=$'\\a\\b\\c\\\001\\d\\e\\f' > $ case $'abc\001def' in $x) echo ok ;; *) echo oops; esac > oops > $ x=$'\\a\\b\\c\\\002\\d\\e\\f' > $ case $'abc\002def' in $x) echo ok ;; *) echo oops; esac > ok Thanks for the report. This is another one that was tric

Re: while loop with extdebug + debug trap always returning 1

2017-04-08 Thread Rocky Bernstein
Thanks for giving me a heads up here. I have updated the bashdb documentation for the skip command make clear that $? is no changed in skipping an instruction. More generally bash saves and restores some state on entry and exit to extdebug, like the variable $? (the extdebug function can issue a c

Re: while loop with extdebug + debug trap always returning 1

2017-04-08 Thread Chet Ramey
On 4/8/17 6:48 PM, Rocky Bernstein wrote: > Thanks for giving me a heads up here. I have updated the bashdb > documentation for the skip command make clear that $? is no changed in > skipping an instruction. OK. I was more concerned with documenting that using "skip" on the while command test will

Re: while loop with extdebug + debug trap always returning 1

2017-04-08 Thread Rocky Bernstein
Good point! Will make note of that too. On Sat, Apr 8, 2017 at 7:15 PM, Chet Ramey wrote: > On 4/8/17 6:48 PM, Rocky Bernstein wrote: > > Thanks for giving me a heads up here. I have updated the bashdb > > documentation for the skip command make clear that $? is no changed in > > skipping an ins

Re: while loop with extdebug + debug trap always returning 1

2017-04-08 Thread Rocky Bernstein
Bashdb skip help is now https://sourceforge.net/p/bashdb/code/ci/master/tree/command/skip.sh#l30 If this is incorrect, deficient, or you have improvements, let me know. Thanks. On Sat, Apr 8, 2017 at 7:52 PM, Rocky Bernstein wrote: > Good point! Will make note of that too. > > On Sat, Apr 8, 2

CTLESC and CTLNUL not dequoted in ${var@E}

2017-04-08 Thread Grisha Levit
$ x='\001\177'; printf %q ${x@E} $'\001\001\001\177' Probably just needs: --- a/subst.c +++ b/subst.c @@ -7253,7 +7253,7 @@ string_transform (xc, v, s) break; /* Transformations that modify the variable's value */ case 'E': - ret = ansiexpand (s, 0, strlen (s), (int *)

CTLESC and CTLNUL not dequoted in exported function definitions

2017-04-08 Thread Grisha Levit
For example: $ f() { $'\001'; }; export -f f; printenv BASH_FUNC_f%% | xxd : 2829 207b 2020 2701 0127 0a7d 0a () { '..'.}. I think the following should fix it: diff --git a/variables.c b/variables.c index 87203dac..acac867e 100644 --- a/variables.c +++ b/variables.c @@ -4309,7 +