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