The man page for zsh mentions for the autoload command an option -U, but doesn't explain it. However, it refers for unexplain options to the functions command. Looking up functions in the man page, I see that it indeed accepts -U, but it isn't explained either.
In examples on the Net, I sometimes see autoload used with and sometimes without -U. What is this option doing, and where is it explained? The explanation must be somewhere in the zsh man pages, but I couldn't find it.
autoload is equivalent to functions -u, and functions is in turn equivalent to typeset -f.
If you look up the section on typeset in the zshbuiltins(1) man page, you’ll finally find your answer:
The
-uand-Uflags cause the function to be marked for autoloading;-Ualso causes alias expansion to be suppressed when the function is loaded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With