From: Maxim Komar <komar@ukr.net>
To: zsh-workers@sunsite.dk
Subject: functions/Misc/prompt-colors
Date: Sun, 11 Mar 2007 20:46:14 +0100 [thread overview]
Message-ID: <20070311194614.GA21414@komar.bionik.tu-berlin.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 85 bytes --]
I think this is usefull for prompts
--
Signature invent in progress 22% ##........
[-- Attachment #2: prompt-colors --]
[-- Type: text/plain, Size: 585 bytes --]
# Quote colors with %{ and %}
# Usefull for prompts
autoload colors
colors
typeset -Hg pr_reset_color pr_bold_color
pr_reset_color="%{$reset_color%}"
pr_bold_color="%{$bold_color%}"
local k
# Foreground
typeset -AHg pr_fg pr_fg_bold pr_fg_no_bold
for k in ${(k)fg}; do
pr_fg[$k]="%{$fg[k]%}"
pr_fg_bold[$k]="%{$fg_bold[$k]%}"
pr_fg_no_bold[$k]="%{$fg_no_bold[$k]%}"
done
# Background
typeset -AHg pr_bg pr_bg_bold pr_bg_no_bold
for k in ${(k)fg}; do
pr_bg[$k]="%{$pr_bg[$k]%}"
pr_bg_bold[$k]="%{$bg_bold[$k]%}"
pr_bg_no_bold[$k]="%{$bg_no_bold[$k]%}"
done
reply other threads:[~2007-03-11 19:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20070311194614.GA21414@komar.bionik.tu-berlin.de \
--to=komar@ukr.net \
--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).