From 14b44016cb6e3bcd58eb5978df7c5dfe2c2d592a Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Wed, 27 Jul 2016 16:59:27 -0700 Subject: [PATCH] Add opam detection to zshrc --- dotfiles/zshrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dotfiles/zshrc b/dotfiles/zshrc index e0a51ea..0759832 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -105,5 +105,7 @@ PROMPT="%{$fg[white]%}┌%{$reset_color%}[%{$fg[yellow]%}%n%{$reset_color%}@%{$f %{$fg[white]%}└─╼%{$reset_color%} " # Run opam init -~/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true -eval `opam config env` +if hash opam 2>/dev/null; then + ~/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true + eval `opam config env` +fi