remove old code

This commit is contained in:
Jakobus Schürz 2021-10-11 08:00:04 +02:00
parent bfce13a609
commit 02202dd66c

32
PS1
View file

@ -18,23 +18,12 @@ set_label() {
# Labels: remote, tmpconfig, screen... # Labels: remote, tmpconfig, screen...
if [ ! -z ${SSH_TTY:+x} ]; then if [ ! -z ${SSH_TTY:+x} ]; then
# oritinal
#LABEL="${LABEL} \[$On_IRed\]\[$BBlack\]remote\[$Color_Off\]"
# use with echo ${LABEL@P}
#LABEL="${LABEL} \[$On_IRed\]remote\[$Color_Off\]"
# use with echo -e ${LABEL}
LABEL="${LABEL} ${On_IRed}${BBlack}remote${Color_Off}" LABEL="${LABEL} ${On_IRed}${BBlack}remote${Color_Off}"
fi fi
if $SSHS ; then if $SSHS ; then
# oritinal
#LABEL="${LABEL} \[$On_IWhite\]\[$BBlack\]tmpconfig\[$Color_Off\]"
# use with echo ${LABEL@P}
#LABEL="${LABEL} \[$On_IWhite\]\[$BBlack\]tmpconfig\[$Color_Off\]"
# use with echo -e ${LABEL}
LABEL="${LABEL} ${On_IWhite}${BBlack}tmpconfig${Color_Off}" LABEL="${LABEL} ${On_IWhite}${BBlack}tmpconfig${Color_Off}"
fi fi
echo -e ${LABEL} echo -e ${LABEL}
#echo ${LABEL@P}
} }
if [ -x "/usr/bin/getsyssubvol" ]; then if [ -x "/usr/bin/getsyssubvol" ]; then
@ -138,20 +127,7 @@ case "$TERM" in
*) SCREEN="";; *) SCREEN="";;
esac esac
# Labels: remote, tmpconfig, screen...
# if [ ! -z ${SSH_TTY:+x} ]; then
# LABEL="${LABEL} \[$On_IRed\]\[$BBlack\]remote\[$Color_Off\]"
# fi
# if $SSHS ; then
# LABEL="${LABEL} \[$On_IWhite\]\[$BBlack\]tmpconfig\[$Color_Off\]"
# fi
# Base prompt # Base prompt
# if [ "`id -u`" -eq 0 ]; then
# PS1="\[$BRed\]$SCREEN\u@\h \[$BRed\]\[\e[m\]\[$IPurple\](\A)\[\e[m\]$LABEL\n\[$BRed\]${SYSSUBVOL}\w:\$(parse_git_branch) \[\e[m\]\[$BRed\]# "
# else
# PS1="\[$BIBlue\]$SCREEN\u@\h \[$BIBlue\]\[\e[m\]\[$IPurple\](\A)\[\e[m\]$LABEL\n\[$BIBlue\]${SYSSUBVOL}\w:\$(parse_git_branch) \[\e[m\]\[$BIBlue\]\$ "
# fi
if [ "`id -u`" -eq 0 ]; then if [ "`id -u`" -eq 0 ]; then
PS1="\[$BRed\]$SCREEN\u@\h \[$BRed\]\[\e[m\]\[$IPurple\](\A)\[\e[m\]\$(set_label)\n\[$BRed\]${SYSSUBVOL}\w:\$(parse_git_branch) \[\e[m\]\[$BRed\]# " PS1="\[$BRed\]$SCREEN\u@\h \[$BRed\]\[\e[m\]\[$IPurple\](\A)\[\e[m\]\$(set_label)\n\[$BRed\]${SYSSUBVOL}\w:\$(parse_git_branch) \[\e[m\]\[$BRed\]# "
else else
@ -161,14 +137,6 @@ case "$TERM" in
RETVALN0="\342\234\227 " RETVALN0="\342\234\227 "
;; ;;
*) *)
# Labels: remote, tmpconfig, screen...
# if [ ! -z ${SSH_TTY:+x} ]; then
# LABEL="${LABEL} \[$On_Red\]\[$BWhite\]remote\[$Color_Off\]"
# fi
# if $SSHS ; then
# LABEL="${LABEL} \[$On_White\]\[$BBlack\]tmpconfig\[$Color_Off\]"
# fi
# Base prompt # Base prompt
if [ "`id -u`" -eq 0 ]; then if [ "`id -u`" -eq 0 ]; then
PS1="\[$BRed\][$SYSSUBVOL]\u@\h \[$BIBlue\]\[\e[m\]\[$BIPurple\](\A)\[\e[m\]\[$BBlue\]\$(set_label)\n\[$BRed\]${SYSSUBVOL}\w:\$(parse_git_branch) \$ \[\e[m\]\[$Blue\]" PS1="\[$BRed\][$SYSSUBVOL]\u@\h \[$BIBlue\]\[\e[m\]\[$BIPurple\](\A)\[\e[m\]\[$BBlue\]\$(set_label)\n\[$BRed\]${SYSSUBVOL}\w:\$(parse_git_branch) \$ \[\e[m\]\[$Blue\]"