Browse Source

direnv: check if direnv is installed (#8809)

Michael Klemm 3 years ago
parent
commit
a3ea785cf5
1 changed files with 3 additions and 0 deletions
  1. 3 0
      plugins/direnv/direnv.plugin.zsh

+ 3 - 0
plugins/direnv/direnv.plugin.zsh

@@ -1,3 +1,6 @@
+# Don't continue if direnv is not found
+command -v direnv &>/dev/null || return
+
 _direnv_hook() {
   trap -- '' SIGINT;
   eval "$(direnv export zsh)";