summaryrefslogtreecommitdiff
path: root/12_Prompts.zsh
diff options
context:
space:
mode:
authorHugues Hiegel <hugues.hiegel@qosmos.com>2013-03-28 11:50:15 +0100
committerHugues Hiegel <hugues.hiegel@qosmos.com>2013-03-28 11:50:15 +0100
commit728acf08bb0b5d61b4c89ec27c8192c8feacce20 (patch)
treedb539bdf414c2d847c2de119ba2b6690d6cf8574 /12_Prompts.zsh
parent8db72288de6ccfda17ce0a14b6ffaaa3a6a09019 (diff)
[DEBUG] Get this fucking prompt blackhole ...
Diffstat (limited to '12_Prompts.zsh')
-rw-r--r--12_Prompts.zsh10
1 files changed, 10 insertions, 0 deletions
diff --git a/12_Prompts.zsh b/12_Prompts.zsh
index 92c986a..2d9ce0e 100644
--- a/12_Prompts.zsh
+++ b/12_Prompts.zsh
@@ -286,7 +286,9 @@ PS1_TASKBAR+=(__display)
__display_vi_mode()
{
+ __debug -n " vimode..."
echo -n "$C_$color[bold];33$_C%8v"
+ __debug
}
PS1_TASKBAR+=(__display_vi_mode)
@@ -296,26 +298,34 @@ __two_lines_prompt ()
# Affiche l'user, l'host, le tty et le pwd. Rien que ça...
#
PS1_=$(print -Pn '\r')$HBAR$(print -Pn '\r')
+ __debug "-----------------> taskbar..."
for trigger in $PS1_TASKBAR
do
+ __debug " ---> $trigger..."
result=$($trigger)
[ -n "$result" ] && PS1_+=$_cuf1_${result}$C_$_prompt_colors[bar]$_C
done
+ __debug "-----------------> date..."
PS1_+=$(__show_date)
+ __debug "-----------------> extra..."
PS1_+="
"$C_$prompt_color[default]$_C$C_$_prompt_colors[user]$_C"%n"$C_$_prompt_colors[arob]$_C"@"$C_$_prompt_colors[host]$_C"%M "$CURDIR${VCSBRANCH:+ $VCSBRANCH}
for trigger in $PS1_EXTRA_INFO
do
+ __debug " ---> $trigger..."
result=$($trigger)
[ -n "$result" ] && PS1_+=" "${result}
done
+ __debug "-----------------> PS1..."
PS1=$PS1_" "$C_$_prompt_colors[dies]$_C"%#"$C_$_prompt_colors[cmd]$_C" "
+ __debug "-----------------> PS2..."
local lastline="$(__expand_text $PS1 | tail -n1)"
# Prompt level 2
PS2="$C_$_prompt_colors[soft_generic]$_C$(for i in {2..$#lastline} ; print -n "·" ; tput sc ; print -n "\r")$C_$color[yellow];$color[bold]$_C%_$(tput rc)$C_$color[none]$_C "
+ __debug "------------------------------"
}