This commit is contained in:
KoDer 2026-10-04 14:09:29 +07:00
parent 9787b69588
commit 66048bff05
2 changed files with 23 additions and 1 deletions

22
activate.zsh Normal file
View File

@ -0,0 +1,22 @@
export VIRTUAL_ENV_PROMPT="%F{red}Xenith%f"
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'

View File

@ -410,7 +410,7 @@ int main(int argc, char** argv) {
tmp_file.close();
} else {
std::cerr << "Ошибка чтения файла новой версии (Пожалуйста напишите о этом баге)" << std::endl;
return false;
return 1;
}
std::cout << "\033[32mДоступна новая версия \033[33m" << remote_str << "\033[32m\nВыполните \"Xenith update\" чтобы обновится до последней версии\033[39m\n" << std::endl;
}