zshrc: Fix umask logic
[grml-etc-core.git] / etc / zsh / zshrc
index 03e272d..8455094 100644 (file)
@@ -261,7 +261,11 @@ zrcautoload is-at-least || is-at-least() { return 1 }
 #o# r_umaskstr  rwxrwxr-x
 #o# umask       022
 #o# umaskstr    rwxr-xr-x
-(( EUID != 0 )) && umask 002 || umask 022
+if (( EUID == 0 )); then
+    umask 002
+else
+    umask 022
+fi
 
 setopt append_history       # append history list to the history file (important for multiple parallel zsh sessions!)
 is4 && setopt SHARE_HISTORY # import new commands from the history file also in other zsh-session
@@ -3711,7 +3715,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* }