Files
Xenith/activate.zsh
T
2026-10-16 20:50:30 +07:00

30 lines
906 B
Bash

# activate.zsh
export VIRTUAL_ENV_PROMPT="%F{red}Xenith%f"
alias Xenith='./bin/Xenith'
alias Build_Shaders='python3 ./tools/build_shaders.py'
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
compdel Xenith 2>/dev/null
compdel Build_Shaders 2>/dev/null
compdel ./bin/Xenith 2>/dev/null
}
alias deactivate='deactivate_custom'
source "${0:A:h}/_xenith"
compdef _xenith Xenith
compdef _xenith ./bin/Xenith