[Grml] Bugreport zshrc+acpi

Frank Terbeck ft at grml.org
Wed Sep 17 19:33:41 CEST 2008


Frank Terbeck <ft at grml.org>:
[...]
> [snip]
> PERCENT=${${"$(acpi 2>/dev/null)"}/(#b)[[:space:]]##Battery <->: [^0-9]##, (<->)%*/${match[1]}}
> [snap]
> 
> Needs extended_glob set, but that's the case in that position already.
> Could you two test the expression above. If it works, I'll commit it
> later this evening.

Well, I discussed this with mika on IRC.
Unfortunately, this does work for him on the command line, but not in
the zshrc file. I have got no idea why that is.

The only thing that's required for that expression is extended_glob
and that is set at that point.

If someone really wants that, please debug it.

Aside from the fact, that my attempt does not work:
This is quite a misleading feature. PERCENT is *never* updated,
AFAICS. And it requires starting zsh in a non standard way
(BATTERY=1).

IMO, this feature should either be fixed or dropped altogether.

People who want this, should look into it.

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925



More information about the Grml mailing list