Aloxaf / fzf-tab

Replace zsh's default completion selection menu with fzf!
MIT License
3.41k stars 96 forks source link

[Q] Is there a quick way to tell whether build-fzf-tab-module has already been run? #409

Closed cohml closed 9 months ago

cohml commented 10 months ago

When I execute build-fzf-tab-module, it takes a long time to run. Like a full minute or more!

Unfortunately - and without going into lots of needless detail that's specific to me - my dotfiles end up executing build-fzf-tab-module somewhat frequently.

So what I'd love is an easy way to deduce whether or not build-fzf-tab-module has already been executed, so that I can skip it if it's not necessary.

Is this possible to do?

Aloxaf commented 9 months ago

You can check whether FZF_TAB_MODULE_VERSION variable exists.

https://github.com/Aloxaf/fzf-tab/blob/b06e7574577cd729c629419a62029d31d0565a7a/fzf-tab.zsh#L399-L408