zuper theme

pull/160/head
Vaidas Zilionis 2012-10-09 17:14:06 +03:00
parent 5c0e1437d4
commit 9049f28385
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
#⚡
#
SCM_THEME_PROMPT_DIRTY=" ${red}${reset_color}"
SCM_THEME_PROMPT_AHEAD=" ${red}!${reset_color}"
SCM_THEME_PROMPT_CLEAN=" ${green}${reset_color}"
SCM_THEME_PROMPT_PREFIX="${cyan} "
SCM_THEME_PROMPT_SUFFIX="${white} "
GIT_SHA_PREFIX="${white} ${yellow}"
GIT_SHA_SUFFIX="${reset_color}"
function git_short_sha() {
SHA=$(git rev-parse --short HEAD 2> /dev/null) && echo "$GIT_SHA_PREFIX$SHA$GIT_SHA_SUFFIX"
}
prompt() {
local git_branch="$(git_short_sha)$(scm_prompt_info)"
PS1="${white}\n[ ${yellow}\u@\H ${white}] ${green}\w${git_branch}\n${white}[ ${red}\t${white} ] →${white} "
}
PROMPT_COMMAND=prompt