Created
August 14, 2018 12:49
-
-
Save davidharting/0aecfa9164ae41a53a88c612f06a4d59 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# The bash-it theme that I use | |
# This is baserd on the Minimal theme with Python version and node version prepended | |
# Because the prompt gets long with the versions, a new line is appended and a | |
# $ prompt character is added | |
SCM_THEME_PROMPT_PREFIX="${cyan}(${green}" | |
SCM_THEME_PROMPT_SUFFIX="${cyan})" | |
SCM_THEME_PROMPT_DIRTY=" ${red}✗" | |
SCM_THEME_PROMPT_CLEAN=" ${green}✓" | |
node_version() | |
{ | |
local br | |
br=$(node -v) | |
test -n "$br" && printf %s "$br" || : | |
} | |
green=$'\e[1;32m' | |
magenta=$'\e[1;35m' | |
normal_colours=$'\e[m' | |
PS1="${PS1:0:$((${#PS1} - 2))} \[$magenta\]\$(_node_version)\[$normal_colours\]\$ " | |
prompt() { | |
PS1="${green}$(node_version) ${yellow}$(python_version_prompt) $(scm_prompt_info)${reset_color} ${cyan}\W${reset_color}\n$ " | |
} | |
safe_append_prompt_command prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I should try to remove number of stashes from my prompt. That is almost never useful information to me.