Open tvraman opened 6 months ago
Using separate bash process for completion appears to fix the problem
Could you give more details about what you're doing and what is going wrong? Why did you write "bc.org"?
Using separate bash process will leave the prompt alone, so definitely, it'll fix any issues with setting PS1, but I'd like to understand and hopefully fix the problem.
Original issue did state what I was doing, will attach again in case it got lost. I'll also include the "activate" bash script generated by Python it's juggling PS1 so it can restore it when the virtual env is deactivated and I suspect that that is getting confused by what bash-completion is doing.
deactivate () {
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
PATH="${_OLD_VIRTUAL_PATH:-}"
export PATH
unset _OLD_VIRTUAL_PATH
fi
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
export PYTHONHOME
unset _OLD_VIRTUAL_PYTHONHOME
fi
# Call hash to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
hash -r 2> /dev/null
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
PS1="${_OLD_VIRTUAL_PS1:-}"
export PS1
unset _OLD_VIRTUAL_PS1
fi
unset VIRTUAL_ENV
unset VIRTUAL_ENV_PROMPT
if [ ! "${1:-}" = "nondestructive" ] ; then
# Self destruct!
unset -f deactivate
fi
}
deactivate nondestructive
VIRTUAL_ENV="/home/raman/.local/share/pipx/venvs" export VIRTUAL_ENV
_OLD_VIRTUAL_PATH="$PATH" PATH="$VIRTUAL_ENV/bin:$PATH" export PATH
if (set -u; : $PYTHONHOME) ;
in bashif [ -n "${PYTHONHOME:-}" ] ; then _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" unset PYTHONHOME fi
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then _OLD_VIRTUAL_PS1="${PS1:-}" PS1="(venvs) ${PS1:-}" export PS1 VIRTUAL_ENV_PROMPT="(venvs) " export VIRTUAL_ENV_PROMPT fi
hash -r 2> /dev/null
--
My earlier notes:
I think it's this one:
bash-completion--ps1 "'==emacs==ret=$?==.'"
bc.org