Download:
child 162:3a9410f18f71
parent 160:e5511bb0506f
161:606cda98621a
Anton Shestakov <av6@dwimlabs.net>, Fri, 18 Jan 2019 20:40:15 +0800
.bash_prompt: some more colors, but mostly shellcheck-detectable nits

1 файлов изменено, 14 вставок(+), 12 удалений(-) [+]
.bash_prompt file | annotate | diff | comparison | revisions
--- a/.bash_prompt Mon Sep 10 17:02:38 2018 +0800
+++ b/.bash_prompt Fri Jan 18 20:40:15 2019 +0800
@@ -4,14 +4,16 @@
local RETURN_CODE="$?"
# dark, light, bold
- local Rd="\[\e[0;31m\]"; local R="\[\e[0;91m\]"; local Rb="\[\e[1;31m\]"
- local Gd="\[\e[0;32m\]"; local G="\[\e[0;92m\]"; local Gb="\[\e[1;32m\]"
- local Yd="\[\e[0;33m\]"; local Y="\[\e[0;93m\]"; local Yb="\[\e[1;33m\]"
- local Bd="\[\e[0;34m\]"; local B="\[\e[0;94m\]"; local Bb="\[\e[1;34m\]"
- local Pd="\[\e[0;35m\]"; local P="\[\e[0;95m\]"; local Pb="\[\e[1;35m\]"
- local Cd="\[\e[0;36m\]"; local C="\[\e[0;96m\]"; local Cb="\[\e[1;36m\]"
+ local Kd='\[\e[0;30m\]'; local K='\[\e[0;90m\]'; local Kb='\[\e[1;30m\]'
+ local Rd='\[\e[0;31m\]'; local R='\[\e[0;91m\]'; local Rb='\[\e[1;31m\]'
+ local Gd='\[\e[0;32m\]'; local G='\[\e[0;92m\]'; local Gb='\[\e[1;32m\]'
+ local Yd='\[\e[0;33m\]'; local Y='\[\e[0;93m\]'; local Yb='\[\e[1;33m\]'
+ local Bd='\[\e[0;34m\]'; local B='\[\e[0;94m\]'; local Bb='\[\e[1;34m\]'
+ local Pd='\[\e[0;35m\]'; local P='\[\e[0;95m\]'; local Pb='\[\e[1;35m\]'
+ local Cd='\[\e[0;36m\]'; local C='\[\e[0;96m\]'; local Cb='\[\e[1;36m\]'
if [[ $TERM == 'linux' ]] ; then
+ K=$Kb
R=$Rb
G=$Gb
Y=$Yb
@@ -20,8 +22,8 @@
C=$Cb
fi
- local BOLD="\[\e[1m\]"
- local RESET="\[\e[0m\]"
+ local BOLD='\[\e[1m\]'
+ local RESET='\[\e[0m\]'
local TIME="${G}\t${RESET}"
@@ -30,13 +32,13 @@
fi
if [[ $EUID == 0 ]] ; then
- local PROMPT_COLOR="$R"
+ local PROMPT_COLOR=$R
# getting hg and git info is disabled for root
local HG_INFO=" ${P}-${RESET}"
local GIT_INFO=" ${G}-${RESET}"
else
- local PROMPT_COLOR="$G"
+ local PROMPT_COLOR=$G
case "$(_upsearch)" in
'hg')
@@ -55,8 +57,8 @@
fi
PS1="\
-[${TIME} \u@\h \
-${RETCODE}\W${VENV}${HG_INFO}${GIT_INFO}]\
+${K}[${RESET}${TIME} \\u@\\h \
+${RETCODE}\\W${VENV}${HG_INFO}${GIT_INFO}${K}]${RESET}\
${PROMPT_COLOR}\\\$${RESET} "
}