From: Clint Adams <clint@zsh.org>
To: zsh-workers@sunsite.dk
Subject: PATCH: prompt_clint and battery level with no battery
Date: Tue, 26 Jun 2001 09:47:41 -0400 [thread overview]
Message-ID: <20010626094741.A12419@dman.com> (raw)
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 "$@"
next reply other threads:[~2001-06-26 13:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-26 13:47 Clint Adams [this message]
2001-06-26 15:28 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010626094741.A12419@dman.com \
--to=clint@zsh.org \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).