[Grml] Bugreport zshrc+acpi

Frank Terbeck ft at grml.org
Thu Sep 18 19:01:57 CEST 2008


Kai Wilke <kiste at netzworkk.de>:
> to works (my configuration /etc/zsh/zshrc):
> 
> battery()
> {

I minor nitpick: the rest of the functions in that files uses
'functname() {' and I think we should stay consistent.

[...]
>         PERCENT=${${"$(acpi 2>/dev/null)"}/(#b)[[:space:]]##Battery <->: [^0-9]##, (<->)%*/${match[1]}}
[...]
> }
[...]
> is4 && [[ -z $NOPRECMD || $NOPRECMD == 0 ]] && precmd () {
[...]
>     if [[ -z $DONTSETRPROMPT || $DONTSETRPROMPT == 0 ]] ; then
>         if [[ $BATTERY == 1 ]] ; then
>             battery
[...]
> }

Other than that, this looks reasonably clean. I this works for
everyone (mika?), I think we can certainly take 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