aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/completion
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--contrib/completion/kern.fish15
1 files changed, 15 insertions, 0 deletions
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