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

Re: PATCH: doshfunc



On Jul 9,  1:28pm, Sven Wischnowsky wrote:
} Subject: Re: PATCH: doshfunc
}
} Bart Schaefer wrote:
} 
} > Meanwhile, Sven:  When exactly does the EF_RUN flag get set?
} 
} When using `autoload +X foo' on a function `foo' that has to be loaded
} with ksh-style loading (because of `kshautoload' or `zcompile -k').

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!

So then I tried:

	unfunction foo
	zcompile -z foo
	mv foo bar
	FPATH=. autoload +X foo

And I get:

	foo () {
		bar () {
			print oops
		}
	}

Finally:

	unsetopt kshautoload
	unfunction foo
	mv bar foo
	zcompile -k foo
	mv foo bar
	FPATH=. autoload +X foo

and I get the magic `foo "$@"' again.

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

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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