Merge 1fea02dffb into 43eb4950b1
commit
3f61e7dc5c
|
|
@ -24,6 +24,9 @@ fi
|
||||||
# Load composure first, so we support function metadata
|
# Load composure first, so we support function metadata
|
||||||
source "${BASH_IT}/lib/composure.sh"
|
source "${BASH_IT}/lib/composure.sh"
|
||||||
|
|
||||||
|
# Also load preexec, so themes can use it if needed
|
||||||
|
source "${BASH_IT}/lib/preexec.sh"
|
||||||
|
|
||||||
# support 'plumbing' metadata
|
# support 'plumbing' metadata
|
||||||
cite _about _param _example _group _author _version
|
cite _about _param _example _group _author _version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copies the Bobby theme and then: a) colors command input differently (blue) from command output (white), by resetting
|
||||||
|
# color immediately prior to command execution using preexec; b) replaces ruby prompt with virtualenv prompt
|
||||||
|
|
||||||
|
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
|
||||||
|
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓"
|
||||||
|
SCM_THEME_PROMPT_PREFIX=" |"
|
||||||
|
SCM_THEME_PROMPT_SUFFIX="${green}|"
|
||||||
|
|
||||||
|
GIT_THEME_PROMPT_DIRTY=" ${red}✗"
|
||||||
|
GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓"
|
||||||
|
GIT_THEME_PROMPT_PREFIX=" ${green}|"
|
||||||
|
GIT_THEME_PROMPT_SUFFIX="${green}|"
|
||||||
|
|
||||||
|
RVM_THEME_PROMPT_PREFIX="|"
|
||||||
|
RVM_THEME_PROMPT_SUFFIX="|"
|
||||||
|
|
||||||
|
VIRTUALENV_THEME_PROMPT_PREFIX='[@env: '
|
||||||
|
VIRTUALENV_THEME_PROMPT_SUFFIX='] '
|
||||||
|
|
||||||
|
function prompt_command() {
|
||||||
|
PS1="\n${yellow}$(virtualenv_prompt)${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} ${blue}"
|
||||||
|
}
|
||||||
|
|
||||||
|
PROMPT_COMMAND=prompt_command;
|
||||||
|
|
||||||
|
function preexec () {
|
||||||
|
tput sgr0
|
||||||
|
}
|
||||||
|
preexec_install
|
||||||
Loading…
Reference in New Issue