akarzim / zsh-docker-aliases

ZSH Docker aliases and functions
MIT License
199 stars 33 forks source link

autoload functions #12

Open MenkeTechnologies opened 4 years ago

MenkeTechnologies commented 4 years ago

dkme, dkmd functions are defined in docker-aliases.plugin.zsh. This slows down startup and increases memory overhead. They should be in a dir in fpath and autoloaded so they are only defined when used. The plugin file should put this dir in fpath and autoload all the function files. This is zsh best practice.

akarzim commented 4 years ago

@MenkeTechnologies Thank you for pointing that out! Can you share a link to documentation on this ZSH best practice? And do not hesitate to submit a pull request on this topic

MenkeTechnologies commented 4 years ago

This plugin adds to fpath and autoloads the plugin functions. https://github.com/MenkeTechnologies/zsh-nginx