summaryrefslogtreecommitdiff
path: root/12_Prompts.zsh
diff options
context:
space:
mode:
authorHugues Hiegel <hugues.hiegel@qosmos.com>2012-03-12 17:11:57 +0100
committerHugues Hiegel <hugues.hiegel@qosmos.com>2012-03-12 17:11:57 +0100
commitbd5a27f6b7b80a7761cff169568ce63dfa7c5c89 (patch)
tree3dbfe4eff84cc96fa7d78682b99290c8663ad222 /12_Prompts.zsh
parentbfffee362f63cc4caf7bbe0c99c8e9b8042226e0 (diff)
[Prompts] cleanup
Diffstat (limited to '12_Prompts.zsh')
-rw-r--r--12_Prompts.zsh5
1 files changed, 3 insertions, 2 deletions
diff --git a/12_Prompts.zsh b/12_Prompts.zsh
index eaf4f40..7448eb4 100644
--- a/12_Prompts.zsh
+++ b/12_Prompts.zsh
@@ -57,7 +57,7 @@ chpwd()
__expand_text()
{
- # strips the %{...%} and everything after \r characters
+ # Strips unprintable characters
print -Pn -- "$(echo $@ | sed 's/\r.*//g;s/%{[^(%})]*%}//g;s/'$T_'//g;s/'$_T'//g')"
}
@@ -79,7 +79,7 @@ __hbar()
preexec ()
{
- __term_title "$(echo $1 | tr ' \n' ' ;' | sed 's/%/%%/g;s/\\/\\\\/g;s/;$//')"
+ __term_title "$2"
_prompt_colors[date]=$_date_colors[exec]
__set_prompt_date x
@@ -91,6 +91,7 @@ preexec ()
lines=$( (__expand_text "$PS1 $1" ) | sed "s/\\(.\{,$COLUMNS\}\\)/\\1\n/g" )
lines=$( echo "$lines" | sed -n '/^$/n;p' | wc -l )
tput sc
+ # /TODO/ GET A WAY TO KNOW IF THERE HAVE BEEN AN HIST_BANG OR NOT...
for i in {1..$lines} ; tput cuu1
print -Pn "$PS1"
tput rc