Re: Assignment of associative arrays through braces

2018-08-20 Thread Chet Ramey
On 8/19/18 10:27 AM, konsolebox wrote:

>> This proposal simply requests an intuitively equivalent simple
>> assignment syntax for associative arrays just like a='...' and
>> a=(...), with same behavior for scoping.
>>
>> Maybe we can add another option like -G to have similar effect but
>> that's a little different already.  Just allowing a={} would make it
>> simpler for every scripter.
> 
> By the way, is this rejected?

No, it will not make it into bash-5.0 so I haven't looked at it further.
It is on the list for a future release.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: bind -u not working for keyseq starting with \e

2018-08-20 Thread Chet Ramey
On 8/6/18 9:33 AM, Hugo Gabriel Eyherabide wrote:

> Bash Version: 4.4
> Patch Level: 18
> Release Status: release
> 
> Description:
> 
> bind -u not working for keyseq starting with \e

In the absence of a keymap argument, the `-u' option works in the current
keymap (like most of the rest of the bind options). You can get it to work
by specifying the keymap:

bind -m emacs-meta -u non-incremental-forward-search-history

assuming you're using emacs editing mode.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: Add sleep builtin

2018-08-20 Thread Chet Ramey
On 8/19/18 10:25 AM, konsolebox wrote:
> Hi Chet,
> 
> The sleep command is often used in loops and using the external sleep
> is expensive.  Perhaps we can add the sleep builtin but have it
> disabled by default to avoid syntax conflict with the external one.

I don't think there's a problem with a `syntax conflict' as long as any
builtin sleep accepts a superset of the POSIX options for sleep(1).

I'm going to wait until after bash-5.0 is released before considering
this. In the meantime, there is the loadable version, which is now built
and installed by default when you run `make install'.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/