feat: add ff pouch to clone and install pouch
Clone https://git.yumee.top/laily/.pouch to ~/.pouch and run install.sh.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Completions for ff command
|
||||
complete -c ff -f
|
||||
set -l ff_subcommands reload edit fish dotfile pon poff pst make script s update help region ssh init copy dirsize help region
|
||||
set -l ff_subcommands reload edit fish dotfile pon poff pst make script s update help region ssh init copy dirsize pouch help region
|
||||
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "reload" -d "Reload fish configuration"
|
||||
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "edit" -d "Edit custom fish configuration"
|
||||
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "fish" -d "Change to fish config directory"
|
||||
@@ -16,6 +16,8 @@ complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "help" -d
|
||||
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "region" -d "Toggle or set CN_REGION (mirror/proxy region)"
|
||||
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "ssh" -d "SSH init / copy key + add host / copy config to remote"
|
||||
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "dirsize" -d "Show directory sizes"
|
||||
complete -c ff -n "not __fish_seen_subcommand_from $ff_subcommands" -a "pouch" -d "Clone and install pouch to ~/.pouch"
|
||||
complete -c ff -n "__fish_seen_subcommand_from pouch" -s h -l help -d "Show help"
|
||||
|
||||
complete -c ff -n "__fish_seen_subcommand_from dirsize" -s a -l all -d "Recursively show all subdirectories"
|
||||
complete -c ff -n "__fish_seen_subcommand_from dirsize" -s d -l depth -d "Recursion depth (default 1)" -r
|
||||
|
||||
@@ -16,6 +16,7 @@ function ff
|
||||
"region|Toggle or set CN_REGION (mirror/proxy region)" \
|
||||
"ssh|SSH init, copy key + add host config, or copy config to remote" \
|
||||
"dirsize|Show directory sizes (du wrapper)" \
|
||||
"pouch|Clone and install pouch to ~/.pouch" \
|
||||
"help|Show this help message"
|
||||
|
||||
# 确保 execute-script 可用(在 fish 自动加载前手动引入一次)
|
||||
@@ -116,6 +117,14 @@ function ff
|
||||
echo "Error: dirsize script not found at $script_path"
|
||||
return 1
|
||||
end
|
||||
case pouch
|
||||
set -l script_path ~/.dotfile/script/pouch-install.sh
|
||||
if test -f $script_path
|
||||
bash $script_path $argv[2..-1]
|
||||
else
|
||||
echo "Error: pouch-install script not found at $script_path"
|
||||
return 1
|
||||
end
|
||||
case region
|
||||
if not functions -q region_toggle
|
||||
source ~/.dotfile/fish/functions/region.fish
|
||||
|
||||
Reference in New Issue
Block a user