zap icon indicating copy to clipboard operation
zap copied to clipboard

Some popular Zsh plugins expect themselves to be added to `fpath` (sindresorhus/pure)

Open mattmc3 opened this issue 1 year ago • 1 comments

Describe the bug

Many Zsh plugins expect themselves to be added to fpath. One example of a plugin that won't work properly if it's not added to fpath is the popular prompt plugin pure.

Other plugin managers do this for users automatically:

Steps to reproduce

# zshrc
plug sindresorhus/pure

Error when not in fpath:

prompt_pure_setup:22: async: function definition file not found
prompt_pure_async_init:6: command not found: async_start_worker
prompt_pure_async_init:7: command not found: async_register_callback
prompt_pure_async_init:8: command not found: async_worker_eval
prompt_pure_async_tasks:7: command not found: async_worker_eval
prompt_pure_async_tasks:27: command not found: async_job

Expected behavior

Zsh plugin managers should add loaded plugins to fpath.

Screenshots and recordings

No response

OS / Linux distribution

All

Zsh version

All

Zap version

Any

Terminal emulator

Any

If using WSL on Windows, which version of WSL

None

Additional context

No response

mattmc3 avatar Apr 16 '23 13:04 mattmc3

I recently got into this. Just a thought if automatically do fpath for all plugin then it would make the fpath very bloated I would suggest let the user decided to add to fpath or not. I will do a pull request.

mannguyen0107 avatar Sep 02 '23 13:09 mannguyen0107