mirror of
https://github.com/wnlen/clash-for-linux.git
synced 2026-10-10 12:13:04 +08:00
fix: install clashon wrappers and clarify post-install shell behavior
This commit is contained in:
@@ -287,9 +287,9 @@ cmd_on() {
|
||||
if [ "$system_proxy_degraded" = "true" ]; then
|
||||
ui_warn "当前通过 clashctl 子进程执行,不能修改当前 Shell 代理变量"
|
||||
else
|
||||
ui_warn "当前通过 clashctl 子进程执行,已开启系统代理,但不会修改当前 Shell 代理变量"
|
||||
ui_warn "当前通过 clashctl 子进程执行,已开启系统代理,但不会修改当前终端的 Shell 变量"
|
||||
fi
|
||||
ui_next "需要当前 Shell 立即生效:source shell 入口后执行 clashon,或重新打开终端"
|
||||
ui_next "当前终端如需立即生效:重新打开终端后使用 clashon,或手动 source shell 入口"
|
||||
ui_blank
|
||||
fi
|
||||
|
||||
|
||||
@@ -2436,6 +2436,8 @@ EOF
|
||||
for shell_rc in "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.profile"; do
|
||||
install_rc_source_block "$shell_rc" "$profile_file"
|
||||
done
|
||||
|
||||
install_alias_command_wrappers
|
||||
}
|
||||
|
||||
remove_clashctl_entry() {
|
||||
@@ -2925,4 +2927,8 @@ print_install_summary() {
|
||||
if [ -f "$clashctl_file" ]; then
|
||||
CLASH_UI_BOX_ONLY=1 bash "$clashctl_file" ui || true
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "💡 clashon / clashoff 为 shell 快捷入口;新终端会自动生效"
|
||||
echo "💡 当前终端若暂不可用,请先使用 clashctl on / clashctl off"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user