|
|
@ -45,7 +45,6 @@ if ! shopt -oq posix; then |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
__prompt_command() { |
|
|
|
local EXIT="$?" # This needs to be first |
|
|
|
|
|
|
@ -59,7 +58,6 @@ __prompt_command() { |
|
|
|
local Mag='\[\e[1;95m\]' |
|
|
|
local Gra='\[\e[1;30m\]' |
|
|
|
|
|
|
|
|
|
|
|
# set xterm title |
|
|
|
echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007" |
|
|
|
|
|
|
@ -70,15 +68,17 @@ __prompt_command() { |
|
|
|
local host=$container_hostname |
|
|
|
case ${host:0:4} in |
|
|
|
'beta') |
|
|
|
PS1+="${Yel}";; |
|
|
|
PS1+="${Yel}" |
|
|
|
;; |
|
|
|
'prod') |
|
|
|
PS1+="${Red}";; |
|
|
|
*) |
|
|
|
PS1+="${Red}" |
|
|
|
;; |
|
|
|
*) ;; |
|
|
|
esac |
|
|
|
PS1+="${host}${Gra}] " |
|
|
|
fi |
|
|
|
|
|
|
|
if [ `id -u` -eq 0 ]; then |
|
|
|
if [ $(id -u) -eq 0 ]; then |
|
|
|
PS1+="${Yel}\u${R}" |
|
|
|
PROMPT='$' |
|
|
|
else |
|
|
@ -90,11 +90,14 @@ __prompt_command() { |
|
|
|
|
|
|
|
case ${HOSTNAME:0:4} in |
|
|
|
'beta') |
|
|
|
PS1+="${Yel}";; |
|
|
|
PS1+="${Yel}" |
|
|
|
;; |
|
|
|
'prod') |
|
|
|
PS1+="${Red}";; |
|
|
|
PS1+="${Red}" |
|
|
|
;; |
|
|
|
*) |
|
|
|
PS1+="${R}";; |
|
|
|
PS1+="${R}" |
|
|
|
;; |
|
|
|
esac |
|
|
|
PS1+="\h" |
|
|
|
|
|
|
@ -141,7 +144,6 @@ __prompt_command() { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
__vte_osc7() { |
|
|
|
# HINT: special character vte to get TILIX show proper hostname and pwd |
|
|
|
# Use \[...\] around the parts of PS1 that have length 0. |
|
|
@ -153,7 +155,6 @@ __vte_osc7 () { |
|
|
|
fi |
|
|
|
printf "\[\033]7;file://%s%s\a\]" "${VTE_INFO}" "$(__vte_urlencode "${PWD}")" |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
__vte_urlencode() ( |
|
|
@ -172,10 +173,8 @@ __vte_urlencode() ( |
|
|
|
done |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
PROMPT_COMMAND='__prompt_command' # Func to gen PS1 after CMDs |
|
|
|
|
|
|
|
|
|
|
|
DEBIAN_BASH_DIR=/opt/debian-bash |
|
|
|
|
|
|
|
# You may uncomment the following lines if you want `ls' to be colorized: |
|
|
@ -210,3 +209,8 @@ for i in {/opt,$HOME}/debian-*/tools; do |
|
|
|
PATH=$PATH:$i |
|
|
|
fi |
|
|
|
done |
|
|
|
|
|
|
|
## Add path for TOOLBOX if any |
|
|
|
if [ -d "/TOOLBOX" ]; then |
|
|
|
PATH=$PATH:/TOOLBOX |
|
|
|
fi |