Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: failed autoload



On Jul 2, 10:55am, Peter Stephenson wrote:
} Subject: Re: PATCH: failed autoload
}
} So it seems to me likely that this got changed incorrectly to flag `no
} code present but no error' instead of `failed to load function, error'.
} 
} Please contradict if you think my logic is wrong.

The difference since the patch mainly seems to be that the autoloaded
function remains undefined (and hence zsh will [attempt to] autoload it
again and again), rather than becoming defined as a no-op function.

Suppose you're calling the failing function in a loop.  Now you'll get
the error repeatedly, as often as the loop manages to keep running,
rather than only once.

schaefer<509> repeat 7 breakthis
breakthis:3: parse error near `\n'
breakthis:3: parse error near `\n'
breakthis:3: parse error near `\n'
breakthis:3: parse error near `\n'
breakthis:3: parse error near `\n'
breakthis:3: parse error near `\n'
breakthis:3: parse error near `\n'

On the other hand, that's what happens even in older zsh with "function
definition file not found" so I'm not sure it's worth preserving the old
behavior.



Messages sorted by: Reverse Date, Date, Thread, Author