From 13c61bae30c3a8cf610623c094f2aa0a95fbf035 Mon Sep 17 00:00:00 2001 From: Amyn Date: Sat, 2 May 2020 19:21:27 +0100 Subject: [PATCH] Do not source history-substring-search if already loaded (#1830) --- modules/history-substring-search/init.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/history-substring-search/init.zsh b/modules/history-substring-search/init.zsh index d3ee3a1..0de7891 100644 --- a/modules/history-substring-search/init.zsh +++ b/modules/history-substring-search/init.zsh @@ -10,7 +10,9 @@ pmodload 'editor' # Source module files. -source "${0:h}/external/zsh-history-substring-search.zsh" || return 1 +if (( ! $+functions[history-substring-search-up] )); then + source "${0:h}/external/zsh-history-substring-search.zsh" || return 1 +fi # # Search