Re: UUID as Array Keys strangely not possible

2019-01-29 Thread Ángel
On 2019-01-26 at 07:55 +, Robert White wrote:
> I've already gone through and replaced or refactored all the 
> double-square-bracket evaluations with single-square-bracket 
> expressions, and otherwise looked for any explicit arithmatic contexts 
> that might be confusing the issue.
> 
> The current state is hideous, which is why I need to back out the hacks; 
> but the ugly hacks went in because of the indexing errors, so something 
> is fishy.
> 
> --Rob.

I would start by checking very carefully the shell that is getting run
on that initramfs.
While it is likely some kind of bash (usually initramfs use a lighter
shell), given that it is not choking much more loudly, it might be a
different version of bash than the one you expected, it might not have
all the libraries that are in the normal userland or even the ulimits
could be affecting the outcome...


Good chase!




Re: `complete -p -- ` doesn't yield reusable input when "-F" is assigned an invalid identifier

2019-01-29 Thread Great Big Dot
> On Sun, Jan 27, 2019 at 6:14 PM Chet Ramey  wrote:
>

> > I prefer this behavior, at least to the extent that the function name
> argument to -F can't contain any shell metacharacters.
>

But it can, and that's the problem. E.g.:

$ complete -F 'meta;char' -- cmd

yields no errors. `complete` is perfectly happy to accept literally any
argument to "-F", it seems. Empty string, multiple words, metacharacters,
you name it---so long as it doesn't contain a null byte, `complete` won't
so much as blink.

This fact *combined* with the fact that `complete -p` doesn't quote it
yields problems. Continuing the above:

$ complete -p -- cmd
==> complete -F meta;char -- cmd

> [...] you would not be able to define a valid shell function with
> that name.
>

No, but `complete` doesn't care. Surely it should care, right? At the very
least, if `complete -F` isn't going to error, `complete -p` shouldn't spit
out the wrong result.


Re: `complete -p -- ` doesn't yield reusable input when "-F" is assigned an invalid identifier

2019-01-29 Thread Chet Ramey
On 1/29/19 8:15 PM, Great Big Dot wrote:
>  
> 
> On Sun, Jan 27, 2019 at 6:14 PM Chet Ramey  > wrote:
> 
> 
> > I prefer this behavior, at least to the extent that the function name
> argument to -F can't contain any shell metacharacters.
> 
> 
> But it can, and that's the problem. E.g.:

Read for context. If you hadn't omitted the part of your message, quoted in
my reply, that comment referenced, it would be clear that my response was
picking one of the alternatives you proposed.

> 
> $ complete -F 'meta;char' -- cmd
> 
> yields no errors. `complete` is perfectly happy to accept literally any
> argument to "-F", it seems. Empty string, multiple words, metacharacters,
> you name it---so long as it doesn't contain a null byte, `complete` won't
> so much as blink.

That's not what I meant. You can't define such a function. It's useless
to allow such a name, so the appropriate behavior is to flag an error
when that name is used with -F.

-- 
``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/