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

Re: PATCH: skip command from debug trap



On Aug 6, 10:47am, Peter Stephenson wrote:
}
} An option to "return" is quite tempting.  This separates out this behaviour
} from any other.  It removes any reliance on obscure numerology. It makes it
} quite explicit this particular mechanism is in use.  Currently return
} doesn't take options at all, so the result is also completely compatible
} with existing versions.

Umm, the argument to return is interpreted as a math expression.  So for
example

	x=-3
	return -x

returns "3", and

	x=3
	return --x

returns "2".  How are you going to make any kind of option parsing for
return behave compatibly with that? 

} (In fact, the lack of option parsing, even --, in return is strictly a
} bug, so this even makes it more compatible with other shells.)

It'd have to be only in emulation mode, then.



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