Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: prompt_clint and battery level with no battery
- X-seq: zsh-workers 15094
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: prompt_clint and battery level with no battery
- Date: Tue, 26 Jun 2001 09:47:41 -0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
On a system with /proc/apm that is not a laptop and thus has
no battery, my prompt has an unfortunate -1% in it.
I also think that the prompt system should behave more
harmoniously with user-defined precmd()s.
Index: Functions/Prompts/prompt_clint_setup
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Prompts/prompt_clint_setup,v
retrieving revision 1.1
diff -u -r1.1 prompt_clint_setup
--- Functions/Prompts/prompt_clint_setup 2001/05/27 05:03:11 1.1
+++ Functions/Prompts/prompt_clint_setup 2001/06/26 13:36:45
@@ -67,7 +67,7 @@
local bat
bat=${${="$(</proc/apm)"}[7]/%/%%}
- [[ $bat == "100%" ]] && psvar[2]=() || psvar[2]=$bat
+ [[ $bat == ("100%"|"-1%") ]] && psvar[3]=() || psvar[2]=$bat
}
prompt_clint_setup "$@"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author