summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2013-10-01 15:55:15 +0200
committerHugues Hiegel <hugues@hiegel.fr>2013-10-01 15:55:15 +0200
commitb6a39dca2f679d9aa78af09ea8c3d65f1dc43ef3 (patch)
treec35cb5819e9105e8053cc45d332ea14c9b7f5873
parent03fb0e46ca19a4486a7c104ce0b70b346869a467 (diff)
[Hbar] Uses search-replace to get value from a shell variable
(Calling the variable from expand-Glob-qualifier does not work)
-rw-r--r--01_Internal.zsh6
-rw-r--r--12_Prompts.zsh2
2 files changed, 4 insertions, 4 deletions
diff --git a/01_Internal.zsh b/01_Internal.zsh
index df9731e..555cad9 100644
--- a/01_Internal.zsh
+++ b/01_Internal.zsh
@@ -95,13 +95,13 @@ __preprint()
local _width=74
local _space=5
- hbar=$T_${(l:$(( $_width - ${#1} - $_space ))::q:)}$_T
+ hbar=$T_${${(l:$(( $_width - ${#1} - $_space ))::q:)}//q/$_tq_}$_T
if [ "$1" != "" ]
then
print -P$newline "${C_}$my_color;1${_C}${hbar}$T_$_tj_$_T${C_}0;$my_color${_C} $1 ${C_}0;$my_color;1${_C}$T_$_tm_$_tq_$_T\r${C_}0${_C}"
else
- print -P$newline "${C_}$my_color;1${_C}${hbar}$T_${(l:${_space}::q:)}$_T${C_}0${_C}"
+ print -P$newline "${C_}$my_color;1${_C}${hbar}$T_${${(l:${_space}::q:)}//q/$_tq_}$_T${C_}0${_C}"
fi
}
@@ -558,7 +558,7 @@ __hbar()
__debug -n " Horizontal bar..."
_COLUMNS_OLD=$COLUMNS
HBAR_COLOR=$C_$_prompt_colors[bar]$_C$T_
- HBAR=$T_${(l:${COLUMNS}::q:)}$_T
+ HBAR=$T_${${(l:${COLUMNS}::q:)}//q/$_tq_}$_T
__debug
fi
}
diff --git a/12_Prompts.zsh b/12_Prompts.zsh
index 0800ad2..7a184d1 100644
--- a/12_Prompts.zsh
+++ b/12_Prompts.zsh
@@ -317,7 +317,7 @@ then
echo -n $c_$_prompt_colors[warning]$_c
#toilet -f bigmono9 "D1rTY Zsh.."
- HBAR=${(l:13::q:)}
+ HBAR=${${(l:13::q:)}//q/$_tq_}
VBAR=$T_$_tx_$_T
echo