aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Müller2022-10-27 16:56:12 +0200
committerWolfgang Müller2022-10-27 16:56:12 +0200
commit09569daaf9ab5d367bc7b873d7233a415bee965a (patch)
tree5331cafe83eb9a2de600355079e13ec0faf5a65f
parent282562a5ea9a6b5f21f190ae05bd38221b75510d (diff)
downloadkern-0.6.0.tar.gz (sig)
Add basic completions for the fish shellHEAD0.6.0master
-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