Fix: correctly unload and reload the module if the user re-source fzf-tab.plugin.zsh or fzf-tab.zsh

This commit is contained in:
Andrea Alberti 2026-01-17 00:02:48 +01:00
parent cbdc58226a
commit 050f6395bd

View file

@ -396,8 +396,11 @@ typeset -ga _ftb_group_colors=(
() {
emulate -L zsh -o extended_glob
# Ensure we don't keep a stale value around
# and allow the aloxaf/fzftab module to set it when loaded.
# Re-source should fully reinitialize; unload the module so boot_ runs again.
if zmodload -e aloxaf/fzftab; then
zmodload -u aloxaf/fzftab &>/dev/null
fi
# Ensure we don't keep a stale value around and allow the module to set it.
unset FZF_TAB_MODULE_VERSION 2>/dev/null
if (( ! $fpath[(I)$FZF_TAB_HOME/lib] )); then