...
|
...
|
@@ -1,14 +1,26 @@
|
1
|
1
|
# Personalized!
|
2
|
|
-# [red][normal][purple][yellow][normal]
|
3
|
|
-# dallas@lappy ~/Sites %
|
4
|
|
-# PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% "
|
5
|
|
-# PROMPT="{white}\{{yellow}{time}{white}\}{green}{host}{white}:{cyan}{pwd} {red,bold}{user}{white}%{normal} "
|
6
|
2
|
|
7
|
|
-DALLAS_CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%T%{$fg[white]%}}%{$reset_color%}"
|
|
3
|
+# Grab the current date (%D) and time (%T) wrapped in {}: {%D %T}
|
|
4
|
+DALLAS_CURRENT_TIME_="%{$fg[white]%}{%{$fg[yellow]%}%D %T%{$fg[white]%}}%{$reset_color%}"
|
|
5
|
+# Grab the current version of ruby in use (via RVM): [ruby-1.8.7]
|
8
|
6
|
DALLAS_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[magenta]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}"
|
|
7
|
+# Grab the current machine name: muscato
|
9
|
8
|
DALLAS_CURRENT_MACH_="%{$fg[green]%}%m%{$fg[white]%}:%{$reset_color%}"
|
10
|
|
-DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~%{$reset_color%}"
|
|
9
|
+# Grab the current filepath, use shortcuts: ~/Desktop
|
|
10
|
+# Append the current git branch, if in a git repository: ~aw@master
|
|
11
|
+DALLAS_CURRENT_LOCA_="%{$fg[cyan]%}%~\$(git_prompt_info)%{$reset_color%}"
|
|
12
|
+# Grab the current username: dallas
|
11
|
13
|
DALLAS_CURRENT_USER_="%{$fg[red]%}%n%{$reset_color%}"
|
12
|
|
-DALLAS_PROMPT_CHAR_="%{$fg[white]%}%%%{$reset_color%}"
|
|
14
|
+# Use a % for normal users and a # for privelaged (root) users.
|
|
15
|
+DALLAS_PROMPT_CHAR_="%{$fg[white]%}%(!.#.%%)%{$reset_color%}"
|
|
16
|
+# For the git prompt, use a white @ and blue text for the branch name
|
|
17
|
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}@%{$fg[blue]%}"
|
|
18
|
+# Close it all off by resetting the color and styles.
|
|
19
|
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
|
20
|
+# Do nothing if the branch is clean (no changes).
|
|
21
|
+ZSH_THEME_GIT_PROMPT_CLEAN=""
|
|
22
|
+# Add 3 cyan ✗s if this branch is diiirrrty! Dirty branch!
|
|
23
|
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[cyan]%}✗✗✗"
|
13
|
24
|
|
|
25
|
+# Put it all together!
|
14
|
26
|
PROMPT="$DALLAS_CURRENT_TIME_$DALLAS_CURRENT_RUBY_$DALLAS_CURRENT_MACH_$DALLAS_CURRENT_LOCA_ $DALLAS_CURRENT_USER_$DALLAS_PROMPT_CHAR_ "
|