diff --git a/activate.sh b/activate.sh index 630fd62..6a5ac51 100644 --- a/activate.sh +++ b/activate.sh @@ -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' \ No newline at end of file diff --git a/bin/Xenith b/bin/Xenith index d265e24..047ec56 100755 Binary files a/bin/Xenith and b/bin/Xenith differ diff --git a/main.cpp b/main.cpp index 70dd7bd..6ff01d5 100644 --- a/main.cpp +++ b/main.cpp @@ -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); diff --git a/version.txt b/version.txt index fa3de58..05b19b1 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.0.5 \ No newline at end of file +0.0.4 \ No newline at end of file