dotfiles/midgard.zsh-theme
M1dgard 084f6a9c42
[zsh] Cooler prompt with two directories
I like it that I have a bit more context, while still not being
overwhelmed
2018-08-20 22:37:45 +02:00

25 lines
735 B
Bash

#!/bin/false
function my_pwd {
# ~ for home; keep only the last two directories
echo $(echo "$PWD" | sed -r '
s,^'"$HOME"',~,
s|^.+/([^/]*/[^/]*)$|\1|
:end')
}
PROMPT='%{$fg[yellow]%}$(my_pwd)$(git_prompt_info)$(git_prompt_status) %{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}  "
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_ADDED=" %{$fg[cyan]%}+"
ZSH_THEME_GIT_PROMPT_MODIFIED=" %{$fg[yellow]%}✭"
ZSH_THEME_GIT_PROMPT_DELETED=" %{$fg[red]%}✗"
ZSH_THEME_GIT_PROMPT_RENAMED=" %{$fg[blue]%}➦"
ZSH_THEME_GIT_PROMPT_UNMERGED=" %{$fg[magenta]%}✂"
ZSH_THEME_GIT_PROMPT_UNTRACKED=" %{$fg[grey]%}✱"
# vim: set ft=zsh noet :