refactor themes to support standardized clock functions
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
|
||||
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓"
|
||||
SCM_THEME_PROMPT_PREFIX="(${yellow}"
|
||||
@@ -13,7 +14,7 @@ RVM_THEME_PROMPT_PREFIX=""
|
||||
RVM_THEME_PROMPT_SUFFIX=""
|
||||
|
||||
function prompt_command() {
|
||||
dtime="${yellow}\T${normal}"
|
||||
dtime="$(clock_prompt)"
|
||||
user_host="${green}\u@${cyan}\h${normal}"
|
||||
current_dir="${bold_blue}\w${normal}"
|
||||
rvm_ruby="${bold_red}$(ruby_version_prompt)${normal}"
|
||||
@@ -22,8 +23,11 @@ function prompt_command() {
|
||||
arrow="${bold_white}▶${normal} "
|
||||
prompt="${bold_green}\$${normal} "
|
||||
|
||||
PS1="${dtime} ${user_host}:${current_dir} ${rvm_ruby} ${git_branch}
|
||||
PS1="${dtime}${user_host}:${current_dir} ${rvm_ruby} ${git_branch}
|
||||
$arrow $prompt"
|
||||
}
|
||||
|
||||
THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$yellow"}
|
||||
THEME_CLOCK_FORMAT=${THEME_TIME_FORMAT:-"%I:%M:%S "}
|
||||
|
||||
safe_append_prompt_command prompt_command
|
||||
|
||||
Reference in New Issue
Block a user