From 3c1d4fe5e4afbd33cf5636fec4db9c16a8a13da2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 21 Aug 2014 03:28:45 -0400 Subject: [PATCH] Don't load everything on dumb terminals --- zshrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zshrc b/zshrc index 6dd75b00..59070578 100644 --- a/zshrc +++ b/zshrc @@ -1,5 +1,13 @@ #!/bin/zsh +# Prevent any of this initialization in non-interactive (or emacs) +# shell commands. It slows them down. +[[ $TERM == "dumb" ]] && return + +function command_exists { + command -v "$1" &> /dev/null +} + # Source Prezto. if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then source ~/.zsh/preztorc