set fn_arr \ clashui \ clashstatus \ clashsecret \ clashtun \ clashmixin \ clashupdate \ clashhelp set -gx fish_version $FISH_VERSION for fn in $fn_arr eval " function $fn bash -i -c '$fn \"\$@\"' -- \$argv end " end function clashctl if test -z "$argv" clashhelp return end set suffix $argv[1] set argv $argv[2..-1] switch $suffix case on clashon $argv case off clashoff $argv case '*' clash"$suffix" $argv end end function clashon bash -i -c 'clashon; sudo tee /var/proxy >/dev/null <