Merge branch 'dev' into codex/establish-codex-bootstrap-document-fej638

This commit is contained in:
Arvin
2026-04-10 16:39:11 +08:00
committed by GitHub
4 changed files with 9 additions and 27 deletions
+5 -2
View File
@@ -74,15 +74,18 @@ _clash_alias_after_on() {
_clash_alias_print_sep
_clash_alias_proxy_show
if [ "${CLASH_WRAPPER_EXEC:-0}" = "1" ]; then
echo "⚠️ 当前通过独立命令执行,Shell 变量不会自动回写到父终端"
echo '💡 请在当前终端执行:eval "$(clashctl proxy on)"'
fi
echo "👉 下一步:$(_clash_alias_status_next)"
}
_clash_alias_after_off() {
_clash_alias_set_persist_enabled "false"
_clash_alias_print_sep
echo "🔴 已关闭代理环境"
echo "🧹 系统代理已关闭"
echo "👉 下一步:clashctl status"
}
_clash_alias_run_on() {
+1 -3
View File
@@ -283,9 +283,7 @@ cmd_off() {
die_state "当前环境不支持系统代理关闭(仅支持可写 /etc/environment)" "clashctl proxy show"
fi
ui_title "🔴 代理环境已关闭"
ui_info "系统代理已关闭"
ui_next "clashctl status"
echo "🧹 系统代理已关闭"
ui_blank
}
+2 -22
View File
@@ -2171,10 +2171,6 @@ EOF
cat > "$target" <<EOF
#!/usr/bin/env bash
set -euo pipefail
if [ -f "$(profile_entry_file)" ]; then
# shellcheck disable=SC1090
source "$(profile_entry_file)"
fi
exec "$bin_target" "\$@"
EOF
chmod +x "$target"
@@ -2207,6 +2203,7 @@ install_alias_command_wrappers() {
cat > "$install_dir/$wrapper_name" <<EOF
#!/usr/bin/env bash
set -euo pipefail
export CLASH_WRAPPER_EXEC="1"
source "$alias_file"
$wrapper_name "\$@"
EOF
@@ -2249,8 +2246,6 @@ fi
EOF
chmod +x "$profile_file"
install_alias_command_wrappers
for shell_rc in "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.profile"; do
install_rc_source_block "$shell_rc" "$profile_file"
done
@@ -2258,22 +2253,7 @@ EOF
remove_clashctl_entry() {
rm -f "$(clashctl_entry_target)" "$(clashctl_bin_entry_target)" 2>/dev/null || true
local wrapper_name
for wrapper_name in \
clashon \
clashoff \
clashproxy \
clashls \
clashselect \
clashui \
clashsecret \
clashtun \
clashupgrade \
clashmixin
do
rm -f "$(command_install_dir)/$wrapper_name" 2>/dev/null || true
done
remove_alias_command_wrappers
}
remove_shell_alias_entry() {
+1
View File
@@ -361,6 +361,7 @@ proxy_group_first_relay_node() {
ensure_default_proxy_group_relay_selected() {
local group current relay
local switched=""
while IFS= read -r group; do