zshrc: vman: Handle zero arguments [Closes: issue993]
[grml-etc-core.git] / etc / zsh / zshrc
index 03e272d..a68687f 100644 (file)
@@ -3711,7 +3711,11 @@ show-archive() {
 #f5# Use \kbd{vim} as your manpage reader
 vman() {
     emulate -L zsh
-    man $* | col -b | view -c 'set ft=man nomod nolist' -
+    if (( ${#argv} == 0 )); then
+        printf 'usage: vman <topic>\n'
+        return 1
+    fi
+    man "$@" | col -b | view -c 'set ft=man nomod nolist' -
 }
 
 # function readme() { $PAGER -- (#ia3)readme* }