X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/a0644f815aaeffc9ffa5c3411f2c3c3d70914586..ba79da8b82d0d955a1ae93b8d38eaa49468ca346:/.zsh/zlogin/90_db

diff --git a/.zsh/zlogin/90_db b/.zsh/zlogin/90_db
index aeaeea0..f55494e 100644
--- a/.zsh/zlogin/90_db
+++ b/.zsh/zlogin/90_db
@@ -8,16 +8,18 @@
 # Source repository: git://git.madduck.net/etc/zsh.git
 #
 
-cnt=0
-db -md1 | while read line; do
-  [ -n "$line" ] || continue
-  if [ $cnt -eq 0 ]; then
-    cnt=$((cnt+1))
-    echo "*** $line"
-  else
-    echo "$line"
-  fi
-done
-[ $cnt -gt 0 ] && echo
+if whence db >/dev/null; then
+  cnt=0
+  db -md1 | while read line; do
+    [ -n "$line" ] || continue
+    if [ $cnt -eq 0 ]; then
+      cnt=$((cnt+1))
+      echo "*** $line"
+    else
+      echo "$line"
+    fi
+  done
+  [ $cnt -gt 0 ] && echo
+fi
 
 # vim:ft=zsh