summaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2011-09-23 15:49:34 +0200
committerGravatar Tom Willemsen2011-09-23 15:49:34 +0200
commitdb8757387581dfa8e7791736594bb26083242e39 (patch)
tree018912107a2646d1cbe6ce2498fc786edfc26b07 /.zshrc
parent3b2dec87f8229c4ac968e8e083ba1d6e42807e00 (diff)
downloaddotfiles-db8757387581dfa8e7791736594bb26083242e39.tar.gz
dotfiles-db8757387581dfa8e7791736594bb26083242e39.zip
ZSH: Print separator between commands
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc13
1 files changed, 12 insertions, 1 deletions
diff --git a/.zshrc b/.zshrc
index 727548d..4c8ca02 100644
--- a/.zshrc
+++ b/.zshrc
@@ -22,6 +22,16 @@ function env()
exec /usr/bin/env "$@" | grep -v ^LESS_TERMCAP_
}
+function line()
+{
+ let width=`expr $COLUMNS - ${#1} - 2`
+ for i in {1..$width}
+ do
+ echo -n \\x2d
+ done
+ echo " $1"
+}
+
# Initialize colors.
autoload -U colors
colors
@@ -42,7 +52,8 @@ chpwd_functions+='chpwd_update_git_vars'
chpwd_functions+='chpwd_show_todo'
# Set the prompt.
-PROMPT='(%{${fg[magenta]}%}%m%{${fg[default]}%} %{${fg[cyan]}%}%B%~%b%{${fg[default]}%}) %(?.%{${fg[green]}%}O.%{${fg[red]}%}X)%{${fg[default]}%} %# '
+PROMPT='%{${fg[black]}%}$(line "$(date +%d-%m-%Y\ %H:%M)")%{${fg[default]}%}
+(%{${fg[magenta]}%}%m%{${fg[default]}%} %{${fg[cyan]}%}%B%~%b%{${fg[default]}%}) %(?.%{${fg[green]}%}O.%{${fg[red]}%}X)%{${fg[default]}%} %# '
RPROMPT='$(prompt_git_info)%{${fg[default]}%}'
# Set terminal name to current runnign application