21 lines
654 B
Bash
21 lines
654 B
Bash
export VIRTUAL_ENV_PROMPT="\033[31mXenith\033[39m"
|
|
alias Xenith='./bin/Xenith'
|
|
if [ -z "${_OLD_VIRTUAL_PS1+x}" ]; then
|
|
_OLD_VIRTUAL_PS1="$PS1"
|
|
fi
|
|
PS1="($VIRTUAL_ENV_PROMPT) $_OLD_VIRTUAL_PS1"
|
|
deactivate_custom() {
|
|
unalias Xenith 2>/dev/null
|
|
unalias deactivate 2>/dev/null
|
|
if [ -n "${_OLD_VIRTUAL_PS1+x}" ]; then
|
|
PS1="$_OLD_VIRTUAL_PS1"
|
|
unset _OLD_VIRTUAL_PS1
|
|
fi
|
|
if (( $+functions[_old_virtual_deactivate] )); then
|
|
_old_virtual_deactivate
|
|
elif (( $+functions[deactivate] )); then
|
|
builtin deactivate 2>/dev/null || true
|
|
fi
|
|
unset -f deactivate_custom
|
|
}
|
|
alias deactivate='deactivate_custom' |