Re: RFE: Please allow unicode ID chars in identifiers

2017-06-14 Thread Greg Wooledge
On Tue, Jun 13, 2017 at 08:06:50PM -0400, Chet Ramey wrote: > That works with Mac OS X, where the output of locale(1) is a series of > shell assignment statements with quoted values; your mileage may vary, of > course. POSIX d

Re: RFE: Please allow unicode ID chars in identifiers

2017-06-14 Thread Greg Wooledge
On Tue, Jun 13, 2017 at 04:58:59PM -0700, L A Walsh wrote: > Forgive me if I'm misremembering, but hasn't Greg argued against > the ability to supply "libraries" of re-usable scripts due to > the ease with which names could conflict with each other and cause > script incompatibilities? Namespace c

Re: AddressSanitizer: heap-buffer-overflow _rl_find_prev_mbchar_internal / expand_prompt

2017-06-14 Thread Eduardo Bustamante
On Tue, Jun 13, 2017 at 04:30:23PM -0400, Chet Ramey wrote: [...] > I can't reproduce it with asan or without on Mac OS X. I'll look around > for a Linux system with asan to run it on. All these inputs seem to trigger the same problem. You'll find the stacktrace as reported by ASAN first, and then

RFE: Fix the name collision issues and typing issues with namerefs, improve various issues for function libraries

2017-06-14 Thread tetsujin
This is relevant to my interests! So first off, the circular reference problem with "declare -n" apparently doesn't exist in Korn Shell: If you "typeset -n x=$1", and $1 is "x", it's not a circular reference. The nameref seems to take the origin of the name into account when creating the nameref:

Re: AddressSanitizer: heap-buffer-overflow _rl_find_prev_mbchar_internal / expand_prompt

2017-06-14 Thread Chet Ramey
On 6/14/17 11:19 AM, Eduardo Bustamante wrote: > On Tue, Jun 13, 2017 at 04:30:23PM -0400, Chet Ramey wrote: > [...] >> I can't reproduce it with asan or without on Mac OS X. I'll look around >> for a Linux system with asan to run it on. > > All these inputs seem to trigger the same problem. You'l

Re: RFE: Fix the name collision issues and typing issues with namerefs, improve various issues for function libraries

2017-06-14 Thread Greg Wooledge
On Wed, Jun 14, 2017 at 12:04:35PM -0400, tetsu...@scope-eye.net wrote: > So first off, the circular reference problem with "declare -n" > apparently doesn't exist in Korn Shell: If you "typeset -n x=$1", and > $1 is "x", it's not a circular reference. Korn shell actually has two different *kinds*

Re: RFE: Fix the name collision issues and typing issues with namerefs, improve various issues for function libraries

2017-06-14 Thread tetsujin
Yeah I didn't really consider ksh's "backward compatible" function syntax in my post because using that form while looking for better support for function libraries would be a needless handicap. You don't even get local variables with the backward-compatible syntax, so there's no hope of getting

Re: RFE: Fix the name collision issues and typing issues with namerefs, improve various issues for function libraries

2017-06-14 Thread tetsujin
I should add the related problem: $ f() { declare -n x=$1; echo "x=$x"; declare y="local Y"; echo "x=$x"; } $ y="global Y" $ f y x=global Y x=local Y In other words, even if you do get a nameref to point to something in the caller's scope, as soon as you shadow that variable with another local v

people working in Greg's locale (+euro) & display of Unicode names

2017-06-14 Thread L A Walsh
Greg Wooledge wrote: Here is a demonstration of the cost of what you are proposing. In my mail user agent, your variable shows up as L??v. iso8859-15 was introduced in 1999 to replace iso8859-1 as it didn't have the Euro symbol. I can set my system to use iso8859-15, but not "-1". If you ha

Re: people working in Greg's locale (+euro) & display of Unicode names

2017-06-14 Thread Chet Ramey
On 6/14/17 5:52 PM, L A Walsh wrote: > Chet Ramey wrote: >> But people don't work in Unicode. They work in their own locale. > >Ok, I have my locale set to latin9 (iso8859-15). > > Attached is a pic of how files display in a console > and how they display in vim. I am less concerned wit

Re: people working in Greg's locale (+euro) & display of Unicode names

2017-06-14 Thread PePa
On 15/06/2560 07:13, Chet Ramey wrote: > A character that is classified as an alphanumeric in a particular locale, > but not in another, can lead to portability problems. That's what we're > debating here, not how something gets displayed in a text editor. I don't think that exists in unicode or U