yay.nix/functions/yay.fish

26 lines
No EOL
650 B
Fish

#!/usr/bin/env fish
# Main dispatch
if test (count $argv) -eq 0
echo "Usage: yay <command> [args]"
echo "Commands: rebuild, update, garbage, try, tar, untar"
exit 1
end
switch $argv[1]
case rebuild
__yay_rebuild $argv[2..-1]; or exit $status
case update
__yay_update $argv[2..-1]; or exit $status
case garbage
__yay_garbage; or exit $status
case try
__yay_try $argv[2..-1]; or exit $status
case tar
__yay_tar $argv[2..-1]; or exit $status
case untar
__yay_untar $argv[2..-1]; or exit $status
case '*'
__yay_red "Unknown subcommand: $argv[1]"
exit 1
end