themes: Lint pure theme
parent
7f193a2e05
commit
b65a7cc67c
|
|
@ -1,3 +1,5 @@
|
|||
# shellcheck shell=bash
|
||||
|
||||
# scm theming
|
||||
SCM_THEME_PROMPT_PREFIX="|"
|
||||
SCM_THEME_PROMPT_SUFFIX=""
|
||||
|
|
@ -18,27 +20,27 @@ VIRTUALENV_THEME_PROMPT_SUFFIX=")"
|
|||
|
||||
scm_prompt() {
|
||||
CHAR=$(scm_char)
|
||||
if [ $CHAR = $SCM_NONE_CHAR ]
|
||||
then
|
||||
if [[ $CHAR = "$SCM_NONE_CHAR" ]]; then
|
||||
return
|
||||
else
|
||||
echo "[$(scm_char)$(scm_prompt_info)]"
|
||||
echo -e "[$(scm_char)$(scm_prompt_info)]"
|
||||
fi
|
||||
}
|
||||
|
||||
pure_prompt() {
|
||||
ps_host="${bold_blue}\h${normal}";
|
||||
ps_user="${green}\u${normal}";
|
||||
ps_user_mark="${green} $ ${normal}";
|
||||
ps_root="${red}\u${red}";
|
||||
ps_host="${bold_blue}\h${normal}"
|
||||
ps_user="${green}\u${normal}"
|
||||
ps_user_mark="${green} $ ${normal}"
|
||||
ps_root="${red}\u${red}"
|
||||
ps_root_mark="${red} # ${normal}"
|
||||
ps_path="${yellow}\w${normal}";
|
||||
|
||||
ps_path="${yellow}\w${normal}"
|
||||
# make it work
|
||||
case $(id -u) in
|
||||
0) PS1="$(virtualenv_prompt)$ps_root@$ps_host$(scm_prompt):$ps_path$ps_root_mark"
|
||||
0)
|
||||
PS1="$(virtualenv_prompt)$ps_root@$ps_host$(scm_prompt):$ps_path$ps_root_mark"
|
||||
;;
|
||||
*) PS1="$(virtualenv_prompt)$ps_user@$ps_host$(scm_prompt):$ps_path$ps_user_mark"
|
||||
*)
|
||||
PS1="$(virtualenv_prompt)$ps_user@$ps_host$(scm_prompt):$ps_path$ps_user_mark"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue