aboutsummaryrefslogtreecommitdiffstats
path: root/.config/zsh/completions/_nvt
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2024-01-05 17:06:06 +0100
committerDavid Runge <dave@sleepmap.de>2024-01-05 17:06:06 +0100
commit2d8f0c8706a68c5704c08fc998cd2a6e140a3765 (patch)
treea80f5e0fcb01789280056763db892c73d7749ece /.config/zsh/completions/_nvt
parent998e0e24fe505824471168d9c9344e203a98c487 (diff)
downloaddotfiles-2d8f0c8706a68c5704c08fc998cd2a6e140a3765.tar.gz
dotfiles-2d8f0c8706a68c5704c08fc998cd2a6e140a3765.tar.bz2
dotfiles-2d8f0c8706a68c5704c08fc998cd2a6e140a3765.tar.xz
dotfiles-2d8f0c8706a68c5704c08fc998cd2a6e140a3765.zip
zsh: Add custom completions for the nvc and nvt wrappers
Signed-off-by: David Runge <dave@sleepmap.de>
Diffstat (limited to '.config/zsh/completions/_nvt')
-rw-r--r--.config/zsh/completions/_nvt10
1 files changed, 10 insertions, 0 deletions
diff --git a/.config/zsh/completions/_nvt b/.config/zsh/completions/_nvt
new file mode 100644
index 0000000..6b2323b
--- /dev/null
+++ b/.config/zsh/completions/_nvt
@@ -0,0 +1,10 @@
+#compdef nvt
+
+_nvt() {
+ local config_dir
+ config_dir="$HOME/.config/nvchecker/"
+ _arguments "1:Arch Linux repository:( $config_dir/*.toml(:t:r) )" '2:Package:( "${(f)$(sed -rn "s/\"//g; /__config__/d; s/^\[(.*)\]$/\1/p" $config_dir/$line[1].toml )}" )'
+}
+
+compdef _nvt nvt
+