Diff
1diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme
2index fd8adc41ea30f26ae9a5179a7796934cc67fbbad..d0845335090cdb1a05221f96d99aa41daa6e2d78 100644
3--- a/themes/ys.zsh-theme
4+++ b/themes/ys.zsh-theme
5@@ -1,18 +1,9 @@
6 # Clean, simple, compatible and meaningful.
7 # Tested on Linux, Unix and Windows under ANSI colors.
8-# It is recommended to use with a dark background and the font Inconsolata.
9+# It is recommended to use with a dark background.
10 # Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
11-#
12-# http://ysmood.org/wp/2013/03/my-ys-terminal-theme/
13-# Mar 2013 ys
14-
15-# Machine name.
16-function box_name {
17- [ -f ~/.box-name ] && cat ~/.box-name || echo $HOST
18-}
19-
20-# Directory info.
21-local current_dir='${PWD/#$HOME/~}'
22+#
23+# Mar 2013 Yad Smood
24
25 # VCS
26 YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} "
27@@ -21,7 +12,7 @@ YS_VCS_PROMPT_SUFFIX="%{$reset_color%}"
28 YS_VCS_PROMPT_DIRTY=" %{$fg[red]%}x"
29 YS_VCS_PROMPT_CLEAN=" %{$fg[green]%}o"
30
31-# Git info.
32+# Git info
33 local git_info='$(git_prompt_info)'
34 ZSH_THEME_GIT_PROMPT_PREFIX="${YS_VCS_PROMPT_PREFIX1}git${YS_VCS_PROMPT_PREFIX2}"
35 ZSH_THEME_GIT_PROMPT_SUFFIX="$YS_VCS_PROMPT_SUFFIX"
36@@ -44,29 +35,24 @@ ys_hg_prompt_info() {
37 fi
38 }
39
40-# Prompt format: \n # USER at MACHINE in DIRECTORY on git:BRANCH STATE [TIME] \n $
41-PROMPT="
42-%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
43-%{$fg[cyan]%}%n \
44-%{$fg[white]%}at \
45-%{$fg[green]%}$(box_name) \
46-%{$fg[white]%}in \
47-%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\
48-${hg_info}\
49-${git_info} \
50-%{$fg[white]%}[%*]
51-%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
52
53-if [[ "$USER" == "root" ]]; then
54+# Prompt format:
55+#
56+# PRIVILEGES USER @ MACHINE in DIRECTORY on git:BRANCH STATE [TIME] L:SHELL_LEVEL N:LINE_NUM
57+# $ COMMAND
58+#
59+# For example:
60+#
61+# % ys @ ys-mbp in ~/.oh-my-zsh on git:master x [21:47:42] tty:s000 L:1 N:12
62+# $
63 PROMPT="
64 %{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
65-%{$bg[yellow]%}%{$fg[cyan]%}%n%{$reset_color%} \
66-%{$fg[white]%}at \
67-%{$fg[green]%}$(box_name) \
68+%(#,%{$bg[yellow]%}%{$fg[black]%}%n%{$reset_color%},%{$fg[cyan]%}%n) \
69+%{$fg[white]%}@ \
70+%{$fg[green]%}%m \
71 %{$fg[white]%}in \
72-%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\
73+%{$terminfo[bold]$fg[yellow]%}%~%{$reset_color%}\
74 ${hg_info}\
75 ${git_info} \
76-%{$fg[white]%}[%*]
77+%{$fg[white]%}[%*] tty:%l L:%L N:%i
78 %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
79-fi