From 09569daaf9ab5d367bc7b873d7233a415bee965a Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Thu, 27 Oct 2022 16:56:12 +0200 Subject: Add basic completions for the fish shell --- contrib/completion/kern.fish | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 contrib/completion/kern.fish diff --git a/contrib/completion/kern.fish b/contrib/completion/kern.fish new file mode 100644 index 0000000..b7660de --- /dev/null +++ b/contrib/completion/kern.fish @@ -0,0 +1,15 @@ +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 -- cgit v1.2.3-2-gb3c3