From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: PATCH: update prompt themes
Date: Sat, 17 May 2008 18:35:10 -0700 [thread overview]
Message-ID: <080517183510.ZM12224@torch.brasslantern.com> (raw)
In-Reply-To: <4430.1211063817@pws-pc>
On May 17, 11:36pm, Peter Stephenson wrote:
}
} - Overhaul of use of precmd and preexec. Use the hook functions
} designed for exactly this purpose so as not to trash any existing
} use of the functions.
Good plan, but:
} - functions[precmd]="${functions[precmd]//prompt_bart_precmd}"
} + precmd_functions[(r)prompt_*_precmd]=
} + precmd_functions=($precmd_functions)
I'm curious why the second assignment is necessary there. Remove an
empty element? Couldn't you just do this?
precmd_functions[(r)prompt_*_precmd]=()
Or perhaps better
add-zsh-hook -D precmd 'prompt_*_precmd'
(Or do I misunderstand the -D option you added?)
} # Abuse the fg assoc to hold our selected colors ...
} - fg[%m]=$fg[${1:-red}]
Er, the fg assoc came from Functions/Misc/colors which you're no longer
including, so it's no longer "abuse" to do this to the $fg that you've
declared global in this same function.
All of the above is in prompt_bart_setup ... I skimmed the other diffs
but didn't try as hard to understand what they were doing.
next prev parent reply other threads:[~2008-05-18 1:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-17 22:36 Peter Stephenson
2008-05-17 23:54 ` Bart Schaefer
2008-05-18 1:35 ` Bart Schaefer [this message]
2008-05-18 16:12 ` 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=080517183510.ZM12224@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--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).