summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2016-01-29 19:07:54 +0100
committerAlan Pearce2016-01-29 19:08:47 +0100
commit64aad8e0919a1519e8f5bb78d714cb4aa55f736f (patch)
tree62527ce6d05a336473dafe8b9fdf54e979a91812
parentb97e9583c07f4f247ab896540ad63157e1f6504d (diff)
downloadnixfiles-64aad8e0919a1519e8f5bb78d714cb4aa55f736f.tar.lz
nixfiles-64aad8e0919a1519e8f5bb78d714cb4aa55f736f.tar.zst
nixfiles-64aad8e0919a1519e8f5bb78d714cb4aa55f736f.zip
zsh: Don’t run fasd if not installed
-rwxr-xr-xtag-zsh/config/zsh/zshrc6
1 files changed, 3 insertions, 3 deletions
diff --git a/tag-zsh/config/zsh/zshrc b/tag-zsh/config/zsh/zshrc
index 496a9756..98fcd5e1 100755
--- a/tag-zsh/config/zsh/zshrc
+++ b/tag-zsh/config/zsh/zshrc
@@ -355,12 +355,12 @@ ec () {
 	fi
 }
 
-_FASD_DATA="$HOME/.cache/zsh/fasd-data"
-if [[ -e ~/.config/zsh/fasd.zsh ]]
+if [[ -n $commands[fasd] && -e ~/.config/zsh/fasd.zsh ]]
 then
+	_FASD_DATA="$HOME/.cache/zsh/fasd-data"
 	source ~/.config/zsh/fasd.zsh
 else
-	echo "fasd init file is missing."
+	echo "fasd not enabled."
 fi
 
 case $os in