diff options
author | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2012-03-01 17:28:23 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues.hiegel@qosmos.com> | 2012-03-01 17:28:46 +0100 |
commit | e1f4769a05e07a42c6e9c245421407d86cf973c5 (patch) | |
tree | 9d74515772bbac4a458dd68526c0e7fceb4f1d36 /net:foret | |
parent | 09f10afe3175543c70a39944c912bc22dae78765 (diff) |
[Prompt] Make utils : show verbose / nproc variables
Diffstat (limited to 'net:foret')
-rw-r--r-- | net:foret/Prompts.zsh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net:foret/Prompts.zsh b/net:foret/Prompts.zsh index 974a9d0..1f96624 100644 --- a/net:foret/Prompts.zsh +++ b/net:foret/Prompts.zsh @@ -12,9 +12,17 @@ _prompt_colors[target]="1;31" __two_lines_prompt () { + COMPILATION=${TARGET:+[}$C_$_prompt_colors[target]$_C${TARGET:+$TARGET}$C_$_prompt_colors[soft_generic]$_C${TARGET:+] } + if [ $((${V:-0} + ${NPROC:-0})) -gt 0 ] + then + COMPILATION=$COMPILATION"[ " + COMPILATION=$COMPILATION$C_$_prompt_colors[target]$_C${V:+V=$V }$C_$_prompt_colors[soft_generic]$_C + COMPILATION=$COMPILATION$C_$_prompt_colors[target]$_C${NPROC:+NPROC=$NPROC }$C_$_prompt_colors[soft_generic]$_C + COMPILATION=$COMPILATION"] " + fi ## Le prompt le plus magnifique du monde, et c'est le mien ! # Affiche l'user, l'host, le tty et le pwd. Rien que ça... PS1=$AGENTS$MAILSTAT$ERROR$BATTERY$C_$_prompt_colors[bar]$_C$STLINUX$HBAR$DATE" -"$C_$prompt_color[default]$_C$C_$_prompt_colors[user]$_C"%n"$C_$_prompt_colors[arob]$_C"@"$C_$_prompt_colors[host]$_C"%m"$C_$_prompt_colors[display]$_C"${DISPLAY:+($DISPLAY)} "$CURDIR$CVSTAG$SVNREV$GITBRANCH$HGBRANCH" "$C_$_prompt_colors[soft_generic]$_C${TARGET:+[}$C_$_prompt_colors[target]$_C${TARGET:+$TARGET}$C_$_prompt_colors[soft_generic]$_C${TARGET:+] }$C_$_prompt_colors[dies]$_C"%#"$C_$_prompt_colors[cmd]$_C" " +"$C_$prompt_color[default]$_C$C_$_prompt_colors[user]$_C"%n"$C_$_prompt_colors[arob]$_C"@"$C_$_prompt_colors[host]$_C"%m"$C_$_prompt_colors[display]$_C"${DISPLAY:+($DISPLAY)} "$CURDIR$CVSTAG$SVNREV$GITBRANCH$HGBRANCH" "$C_$_prompt_colors[soft_generic]$_C$COMPILATION$C_$_prompt_colors[dies]$_C"%#"$C_$_prompt_colors[cmd]$_C" " } |