zdharma-continuum / zinit

🌻 Flexible and fast ZSH plugin manager
MIT License
3.2k stars 129 forks source link

[maint]: missing lib function #666

Open Svartorm opened 3 months ago

Svartorm commented 3 months ago

Summary

I have just newly pick up zinit but while making the swap from OMZ, i came across an issue regarding the web-search plugin. Using the web_search() function defined return some missing code :

$ ddg thisisawebsearch
zsh: command not found: omz_urlencode
zsh: command not found: open_command

Note: ddg is an alias for web_search duckduckgo

Proposed fix

I have manually looked into the plugin's code and search for the missing functions omz_urlencode() and open_command() and found them in the file function.zsh (link) in the lib folder of OMZ. Getting that file and sourcing it patched the error.

I do not have any knowledge of how many OMZ plugin use functions from its lib like that nor to what extent the zinit project could suffer from copying those lib file but it might be an option to consider to fully support OMZ plugins out of the box.