set -l commands all set config diff build install postinst clean complete -c kern -f complete -c kern -n "not __fish_seen_subcommand_from $commands" -a all -d "Run the suite of commands in order" complete -c kern -n "not __fish_seen_subcommand_from $commands" -a set -d "Select the given kernel" complete -c kern -n "not __fish_seen_subcommand_from $commands" -a config -d "Configure the kernel using the given template" complete -c kern -n "not __fish_seen_subcommand_from $commands" -a diff -d "Display differences between kernel configurations" complete -c kern -n "not __fish_seen_subcommand_from $commands" -a build -d "Build the selected kernel" complete -c kern -n "not __fish_seen_subcommand_from $commands" -a install -d "Install the selected kernel" complete -c kern -n "not __fish_seen_subcommand_from $commands" -a postinst -d "Run post-installation jobs" complete -c kern -n "not __fish_seen_subcommand_from $commands" -a clean -d "Remove obsolete kernels" complete -c kern -n "__fish_seen_subcommand_from set" -a "(eselect --brief kernel list)" complete -c kern -n "__fish_seen_subcommand_from config" -a "(string match -v base (path filter -f /etc/kernfrag/templates/* | path basename))" complete -c kern -n "__fish_seen_subcommand_from diff" -F