summaryrefslogtreecommitdiffstats
path: root/.zsh/prompt
diff options
context:
space:
mode:
Diffstat (limited to '.zsh/prompt')
-rw-r--r--.zsh/prompt14
1 files changed, 14 insertions, 0 deletions
diff --git a/.zsh/prompt b/.zsh/prompt
new file mode 100644
index 0000000..17e578d
--- /dev/null
+++ b/.zsh/prompt
@@ -0,0 +1,14 @@
+# functions
+function git_prompt_info {
+ git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
+}
+
+# Load colors
+autoload -U colors && colors
+
+setopt promptsubst
+local CUR_BRANCH='$(git_prompt_info)'
+
+PROMPT="%{$fg[blue]%}[%{$fg[yellow]%}%n%{$fg[blue]%}@%{$fg[green]%}%m%{$fg[yellow]%}:%~%{$fg[blue]%}]%{$fg[red]%}${CUR_BRANCH}%{$fg[green]%}%# %{$reset_color%}"
+
+RPROMPT='[%?]'