Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zsh autoload #4

Open
jdhao opened this issue Jun 12, 2023 · 0 comments
Open

zsh autoload #4

jdhao opened this issue Jun 12, 2023 · 0 comments

Comments

@jdhao
Copy link
Owner

jdhao commented Jun 12, 2023

  1. autoload is a zsh builtin, its doc can be found in man zhsbuiltins.
    • -U: alias expansion is suppressed when the function is loaded.
    • -z: The flags -z and -k mark the function to be autoloaded using the zsh or ksh style, as if the option KSH_AUTOLOAD were unset or were set, respectively

the meaning of KSH_AUTOLOAD is defined in man zhsoptions:

Emulate ksh function autoloading. This means that when a function is autoloaded, the corresponding file is merely executed, and must define the function itself. (By default, the function is defined to the contents of the file. However, the most common ksh-style case - of the file containing only a simple definition of the function - is always handled in the ksh-compatible manner.)

  1. autoloading functions: https://zsh.sourceforge.io/Doc/Release/Functions.html
  2. what does autoload do in Zsh? https://stackoverflow.com/q/30840651/6064933
  3. zsh autoload, what is it good for? https://stackoverflow.com/q/4493173/6064933
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant