From b6a39dca2f679d9aa78af09ea8c3d65f1dc43ef3 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 1 Oct 2013 15:55:15 +0200 Subject: [Hbar] Uses search-replace to get value from a shell variable (Calling the variable from expand-Glob-qualifier does not work) --- 01_Internal.zsh | 6 +++--- 12_Prompts.zsh | 2 +- 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 -- cgit v1.2.3