]> git.rmz.io Git - dotfiles.git/blobdiff - zsh/functions/run-help-aur
zsh: add run-help-aur
[dotfiles.git] / zsh / functions / run-help-aur
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 $?