From 04bfb5131b63c626062af535a1c429f9ff303ca4 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Tue, 11 Jul 2017 12:42:55 -0700 Subject: [PATCH] fasd: fall back to submodule only if command is missing --- modules/fasd/init.zsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/fasd/init.zsh b/modules/fasd/init.zsh index 9a68d0d2b6..44d6297517 100644 --- a/modules/fasd/init.zsh +++ b/modules/fasd/init.zsh @@ -9,8 +9,11 @@ # Load dependencies. pmodload 'editor' -# Source module file. -source "${0:h}/external/fasd" || return 1 +# If the command doesn't exist externally, we need to fall back to the bundled +# submodule. +if (( ! $+commands[fasd] )); then + source "${0:h}/external/fasd" || return 1 +fi # # Initialization