* functions/Misc/prompt-colors
@ 2007-03-11 19:46 Maxim Komar
0 siblings, 0 replies; only message in thread
From: Maxim Komar @ 2007-03-11 19:46 UTC (permalink / raw)
To: zsh-workers
[-- 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-11 19:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-11 19:46 functions/Misc/prompt-colors Maxim Komar
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).