about summary refs log tree commit diff
path: root/.config
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2020-07-18 21:41:35 -0500
committerStarfall <us@starfall.systems>2020-07-22 14:36:08 -0500
commit75434ca6f326fbe1f74384c24b1bb74f7aca3de6 (patch)
tree63349e929041943f2697e46fe094ec6cd1473991 /.config
parentc72469f29f9d27d04b3cc124788b7a063ab43c46 (diff)
zsh: custom prompt
Diffstat (limited to '.config')
-rw-r--r--.config/zsh/.zshrc12
1 files changed, 10 insertions, 2 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
index fda6c62..79cd4c9 100644
--- a/.config/zsh/.zshrc
+++ b/.config/zsh/.zshrc
@@ -57,7 +57,6 @@ zle -N zle-line-finish
 alias diff='diff --color'
 alias ls='ls --color=auto'
 export LESS='-R'
-
 grep_opts="--color=auto --exclude-dir=.git"
 alias grep="grep $grep_opts"
 alias egrep="egrep $grep_opts"
@@ -83,7 +82,16 @@ function spacetotab () {
 }
 
 # prompt
-setopt prompt_subst
+# TODO maybe just use someone else's theme altogether
+# TODO git integration was useful - port something from belak/zsh-utils or ohmyzsh
+# TODO location should control its length a little better
+# TODO only color the last segment of the path (pwd)
+last_status="%(?.%F{green}%#.%F{red}%?)%f"
+location="%F{blue}%3~%f"
+PROMPT="[%n@%m:$location] $last_status "
+RPROMPT="%!"
+unset last_status
+unset location
 
 # display a fortune when opening an interactive terminal
 tty -s && fortune $HOME/fortunes 2>/dev/null ||: