I have a little script that sets my proxy system wide in one go, it calls gconftool-2, sets a proxy in ~/.ssh/config and sets the proxy for apt. This is all relatively simple. The real problem comes in updating my running bash sessions.
It is possible to run a command from the prompt ($PS1, $PROMPT_COMMAND, even binding enter to a command) - but these are all executed as separate commands - and hence have no influence on my current environment. Instead of executing these commands, I'd like to source them.
Even this doesn't work:
export PS1="\$(source /etc/profile.d/proxy.sh)$ "
I understand why it doesn't work (I think), but how can I get around it?
thanks Mark