This commit is contained in:
KoDer 2026-10-01 18:06:22 +07:00
parent 0dd3e46b6f
commit a081d4d7e8
4 changed files with 6 additions and 12 deletions

View File

@ -4,23 +4,18 @@ if [ -z "${_OLD_VIRTUAL_PS1+x}" ]; then
_OLD_VIRTUAL_PS1="$PS1"
fi
PS1="($VIRTUAL_ENV_PROMPT) $_OLD_VIRTUAL_PS1"
echo "Xenith activate (zsh)"
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
echo "Xenith deactivated"
}
alias deactivate='deactivate_custom'

Binary file not shown.

View File

@ -367,10 +367,6 @@ static int cmd_tui(const Args& a)
}
int main(int argc, char** argv) {
if (argc < 2) { printf(HELP_TEXT); return 1; }
const std::string cmd = argv[1];
if (cmd == "-h" || cmd == "--help" || cmd == "help") { printf(HELP_TEXT); return 0; }
if (available_new_version()) {
const std::string TMP_FILE = "./tmp/remote_version.txt";
std::ifstream tmp_file(TMP_FILE);
@ -381,10 +377,13 @@ int main(int argc, char** argv) {
std::cerr << "Ошибка чтения файла новой версии (Пожалуйста напишите о этом баге)" << std::endl;
return false;
}
std::cout << "\033[32mДоступна новая версия \033[33m" << remote_str << "\nВыполните \"Xenith update\" чтобы обновится до последней версии\033[39m\n" << std::endl;
return 0;
std::cout << "\033[32mДоступна новая версия \033[33m" << remote_str << "\033[32m\nВыполните \"Xenith update\" чтобы обновится до последней версии\033[39m\n" << std::endl;
}
if (argc < 2) { printf(HELP_TEXT); return 1; }
const std::string cmd = argv[1];
if (cmd == "-h" || cmd == "--help" || cmd == "help") { printf(HELP_TEXT); return 0; }
Args a(argc, argv, 2);
if (cmd == "new") return cmd_new(a);
if (cmd == "train") return cmd_train(a);

View File

@ -1 +1 @@
0.0.5
0.0.4