From 9049f28385fa7c8475089363fac26a130ae8b68f Mon Sep 17 00:00:00 2001 From: Vaidas Zilionis Date: Tue, 9 Oct 2012 17:14:06 +0300 Subject: [PATCH] zuper theme --- themes/zuper/zuper.theme.bash | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 themes/zuper/zuper.theme.bash diff --git a/themes/zuper/zuper.theme.bash b/themes/zuper/zuper.theme.bash new file mode 100644 index 00000000..a4e5a2ab --- /dev/null +++ b/themes/zuper/zuper.theme.bash @@ -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 \ No newline at end of file