]> git.rmz.io Git - dotfiles.git/commitdiff
zsh: add run-help-aur
authorSamir Benmendil <me@rmz.io>
Wed, 12 May 2021 19:03:04 +0000 (20:03 +0100)
committerSamir Benmendil <me@rmz.io>
Wed, 12 May 2021 19:04:57 +0000 (20:04 +0100)
zsh/functions/run-help-aur [new file with mode: 0644]

diff --git a/zsh/functions/run-help-aur b/zsh/functions/run-help-aur
new file mode 100644 (file)
index 0000000..8b46dcd
--- /dev/null
@@ -0,0 +1,25 @@
+if [ $# -eq 0 ]; then
+    man aur
+    return
+fi
+
+while [[ $# != 0 && $1 == -* ]]; do
+    shift
+done
+
+case $1 in
+    (b*)     man aur-build       ;;
+    (d*)     man aur-depends     ;;
+    (f*)     man aur-fetch       ;;
+    (g*)     man aur-graph       ;;
+    (p*)     man aur-pkglist     ;;
+    (repo-*) man aur-repo-filter ;;
+    (repo)   man aur-repo        ;;
+    (se*)    man aur-search      ;;
+    (sr*)    man aur-srcver      ;;
+    (sy*)    man aur-sync        ;;
+    (v*)     man aur-vercmp      ;;
+    (*)      man aur             ;;
+esac
+
+return $?