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

Re: PATCH: doshfunc



Bart Schaefer wrote:

> ...
> 
> Well, I just did this:
> 
> 	echo 'bar() { print oops }' > foo
> 	setopt kshautoload
> 	FPATH=. autoload +X foo
> 
> and got no complaint at all.  And look what "functions foo" gives me:
> 
> 	foo () {
> 		bar () {
> 			print oops
> 		}
> 		foo "$@"
> 	}
> 
> Something has magically supplied the `foo "$@"' at the end of the file!

It's eval_autoload() -- which you wrote this way in 8404 ;-)

> ...
> 
> So I still can't reach the `goto doneshfunc'.

You were asking about EF_RUN, that's what I tried to explain.

If you want that error message:

  % echo 'bar() { echo foobar }' >foo
  % zcompile -k foo
  % fpath=(. $fpath)
  % autoload foo
  % foo
  zsh: foo: function not defined by file

or:

  % rm -f foo.zwc
  % echo 'bar() { echo foobar }' >foo
  % setopt kshautoload
  % fpath=(. $fpath)
  % autoload foo
  % foo
  zsh: foo: function not defined by file


Bye
  Sven


-- 
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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