From: "arno." <arno.@no-log.org>
To: zsh-workers@sunsite.dk
Subject: bugs in prompt_zefram_setup and prompt_clint_setup
Date: Wed, 6 Sep 2006 02:33:23 +0200 [thread overview]
Message-ID: <20060906003323.GA10153@localhost.localdomain> (raw)
[-- Attachment #1: Type: text/plain, Size: 1839 bytes --]
Hello,
I had a bug with zefram and clint prompts themes.
Theses prompts put stuff in psvar. When ksharrays is set, the references
are wrong. Prompt themes working with psvar should always check that
ksharrays is not set.
I found another bug in clint in prompt_clint_precmd
setopt noxtrace localoptions
local exitstatus=$?
I think exitstatus is supposed to get the exit status of the last
command. But as setopt is execute just before, exitstatus always
receives "0". setopt should be after "local exitstatus=$?"
Here is a patch, apply with patch -p 0
>>>>
diff -Nur zsh/Functions/Prompts/prompt_clint_setup zsh~/Functions/Prompts/prompt_clint_setup
--- zsh/Functions/Prompts/prompt_clint_setup 2006-09-06 02:07:42.000000000 +0200
+++ zsh~/Functions/Prompts/prompt_clint_setup 2006-09-06 02:07:59.000000000 +0200
@@ -56,8 +56,8 @@
}
prompt_clint_precmd () {
- setopt noxtrace localoptions
local exitstatus=$?
+ setopt noxtrace noksharrays localoptions
[[ $exitstatus -ge 128 ]] && psvar[1]=" $signals[$exitstatus-127]" ||
psvar[1]=""
@@ -67,7 +67,7 @@
}
prompt_clint_apm_precmd () {
- setopt noxtrace localoptions
+ setopt noxtrace noksharrays localoptions
local bat ac
bat=${${="$(</proc/apm)"}[7]/%/%%}
diff -Nur zsh/Functions/Prompts/prompt_zefram_setup zsh~/Functions/Prompts/prompt_zefram_setup
--- zsh/Functions/Prompts/prompt_zefram_setup 1999-11-19 12:48:09.000000000 +0100
+++ zsh~/Functions/Prompts/prompt_zefram_setup 2006-09-06 01:49:29.000000000 +0200
@@ -1,5 +1,6 @@
function prompt_zefram_precmd {
local exitstatus=$?
+ setopt localoptions noxtrace noksharrays
psvar=(SIG)
[[ $exitstatus -gt 128 ]] && psvar[1]=SIG$signals[$exitstatus-127]
[[ $psvar[1] = SIG ]] && psvar[1]=$exitstatus
>>>>
hopes this helps
arno
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2006-09-06 0:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-06 0:33 arno. [this message]
2006-09-07 18:10 ` Peter Stephenson
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=20060906003323.GA10153@localhost.localdomain \
--to="arno."@no-log.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).