For example, I've added the following to my .bashrc:
Code: Select all
# Arnold
ARNOLD=/opt/solidangle/mtoa/2018
PATH=$ARNOLD/bin:$PATH
# Redshift
REDSHIFT=/usr/redshift
PATH=$REDSHIFT/bin:$PATH
# System
export PATH=$PATH:$HOME/.local/bin:$HOME/bin
Here's the issue: when I run echo $PATH after setting the variable (and sourcing) I get:
/usr/redshift/bin:/opt/solidangle/mtoa/2018/bin:<restOfPath>:/home/user/local/bin:/home/user/bin.
On a reboot however, the path turns into:
/usr/redshift/bin:/opt/solidangle/mtoa/2018/bin:/usr/redshift/bin:/opt/solidangle/mtoa/2018/bin:<restOfPath>:/home/user/local/bin:/home/user/bin:/home/user/local/bin:/home/user/bin.
This path duplication carries on and expands through reboots, so if I were to reboot again I would then have three of each, four of each, etc etc. If I remove the PATH variable, nothing happens after sourcing it; the path remains unchanged. If I remove the offending lines completely, then I'm left with whatever the previous boots path was until I reboot the machine to get my clean PATH back.
Has anyone ever seen this before and know of a way to fix it?
Cheers,
Mike
Edit: I'm also using powerline-shell, which has be inject this into the .bashrc file:
Code: Select all
function _update_ps1() {
PS1="$(powerline-shell $?)"
}
if [ "$TERM" != "linux" ]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMAND"
fi