fasd: fall back to submodule only if command is missing

This commit is contained in:
Kaleb Elwert 2017-07-11 12:42:55 -07:00
parent 19990c8025
commit 04bfb5131b
1 changed files with 5 additions and 2 deletions

View File

@ -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