diff options
author | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2012-03-20 15:31:22 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2012-03-20 15:31:22 +0100 |
commit | 6b79a02669d4648bac44626c514e02f1898e05c2 (patch) | |
tree | 50197cf844566f47ce31bb52807e2d6204541162 /01_Internal.zsh | |
parent | 60067df38b00e7b63b40c29209a9309d0d0e748d (diff) |
[Funcs] Preprint : added '-n' parameter
Diffstat (limited to '01_Internal.zsh')
-rw-r--r-- | 01_Internal.zsh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/01_Internal.zsh b/01_Internal.zsh index 297f274..1e91763 100644 --- a/01_Internal.zsh +++ b/01_Internal.zsh @@ -77,7 +77,13 @@ __term_title() __preprint() { - local my_color i + local my_color i newline + if [ "$1" = "-n" ] + then + newline='n' + shift + fi + my_color=${2-"$_prompt_colors[generic]"} hbar=$T_ @@ -89,9 +95,9 @@ __preprint() if [ "$1" != "" ] then - print -Pn "${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}" + 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 -Pn "${C_}$my_color;1${_C}${hbar}$T_$_tq_$_tq_$_tq_$_tq_$_tq_$_T${C_}0${_C}" + print -P$newline "${C_}$my_color;1${_C}${hbar}$T_$_tq_$_tq_$_tq_$_tq_$_tq_$_T${C_}0${_C}" fi } |