]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
zsh/rc: Don't use which.
authorSimon Ruderich <simon@ruderich.org>
Tue, 14 Feb 2012 01:36:48 +0000 (02:36 +0100)
committerSimon Ruderich <simon@ruderich.org>
Tue, 14 Feb 2012 01:36:48 +0000 (02:36 +0100)
zsh/rc

diff --git a/zsh/rc b/zsh/rc
index 4f5d10029e595ba1af957c5eecdf7d070440323b..0cd67562b456e7bd8a0a1a23dd58fed5d36a2ac3 100644 (file)
--- a/zsh/rc
+++ b/zsh/rc
@@ -739,7 +739,7 @@ done &)
 # Run reminder and redisplay it every four hours (if it's available).
 PERIOD=14400
 periodic() {
-    which rem > /dev/null && [ -f ~/.reminders ] && rem -h
+    (( $+commands[rem] )) && [ -f ~/.reminders ] && rem -h
 }