improve start-up mechanism, so that PS1 definied in /home/chris/.bashrc does...

improve start-up mechanism, so that PS1 definied in /home/chris/.bashrc does not override PS1 set by BashStyle-NG
parent af57c437
......@@ -8,6 +8,9 @@ Overview of changes in v9.1 "Dial T for TNT"
some of the keybindings set from UI didn't take effect
* #189 (colorshell):
option colorshell_reset did not work
* #190 (bashstyle.sh/nx-rc):
improve start-up mechanism, so that PS1 definied in ${HOME}/.bashrc
does not override PS1 set by BashStyle-NG
=== Widgets ===
......
......@@ -8,8 +8,6 @@
# #
#########################################################
[[ ${PATH} != *games* && -d /usr/games/ ]] && \
PATH="${PATH}:/usr/games/:/usr/local/games/"
export PATH="@DATADIR@/bashstyle-ng/rc/functions/:${PATH}:."
source @DATADIR@/bashstyle-ng/rc/nx-rc
if [ ! $(grep "nx-rc" ${HOME}/.bashrc) >/dev/null 2>&1 ]; then
echo -e "\nsource @DATADIR@/bashstyle-ng/rc/nx-rc" >> ${HOME}/.bashrc
fi
......@@ -84,22 +84,6 @@ if [[ $(ini_get use_bashstyle) == True ]]; then
dbg_msg $"BashStyle-NG Loading:" $"BashStyle-NG"
dbg_log source ${BSNG_RC_DIR}/styles/null-rc
if [[ $(lsb_release -is) == Debian ]]; then
# if [[ ${1} == -r ]]; then
# START_LINE=$(sed -n '/^\#if \[ "$color_prompt" = yes/=' ~/.bashrc)
# if [[ ${START_LINE} ]]; then
# END_LINE=$((${START_LINE}+14))
# sed -e "${START_LINE},${END_LINE}s/^\#//" -i ~/.bashrc
# fi
# else
START_LINE=$(sed -n '/^if \[ "$color_prompt" = yes/=' ~/.bashrc)
if [[ ${START_LINE} ]]; then
END_LINE=$((${START_LINE}+14))
sed -e "${START_LINE},${END_LINE}s/^/\#/" -i ~/.bashrc
fi
# fi
fi
dbg_msg $"BashStyle-NG Setting:" $"ps2 ps3 ps4 char" $(ini_get ps234)
ps234char=$(ini_get ps234)
......@@ -293,4 +277,10 @@ function reload () {
}
[[ ${PATH} != *games* && -d /usr/games/ ]] && \
PATH="${PATH}:/usr/games/:/usr/local/games/"
[[ ${PATH} != *bashstyle-ng/rc* ]] && \
export PATH="@DATADIR@/bashstyle-ng/rc/functions/:${PATH}:."
dbg_finalize
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment