summaryrefslogtreecommitdiff
path: root/01_Internal.zsh
diff options
context:
space:
mode:
authorHugues Hiegel <hugues@hiegel.fr>2012-04-19 12:17:39 +0200
committerHugues Hiegel <hugues@hiegel.fr>2012-04-19 12:17:39 +0200
commit8c682713684132a010fab9154e1dad9d5201ca72 (patch)
tree746e214693d60ef5d08c92a6ba993b7e463f4fad /01_Internal.zsh
parent22790301b29a066aea05acb438d7d742a0a907e9 (diff)
parent1bb783d5b881368a321f0979971acf86279dfb49 (diff)
Merge branch 'master' of git:zdotdir
Diffstat (limited to '01_Internal.zsh')
-rw-r--r--01_Internal.zsh12
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
}