fix: toggle-resion

This commit is contained in:
2026-06-27 11:20:47 +08:00
parent acac6c3650
commit 0548056ca4
5 changed files with 153 additions and 20 deletions
+4 -7
View File
@@ -112,19 +112,16 @@ function ff
return 1
end
case region
if not functions -q region_toggle
source ~/.dotfile/fish/functions/region.fish
end
set -l sub toggle
if test (count $argv) -ge 2
set sub $argv[2]
end
switch $sub
case toggle
if test "$CN_REGION" = "1"
set -gx CN_REGION 0
echo "Switched to: 0 (国外)"
else
set -gx CN_REGION 1
echo "Switched to: 1 (国内)"
end
region_toggle
case '*'
echo "Usage: ff region [toggle]"
echo "Unknown subcommand: $sub"