Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Bug in "zed" with autoloaded functions
- X-seq: zsh-workers 20244
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: Bug in "zed" with autoloaded functions
- Date: Sun, 8 Aug 2004 09:51:35 -0700 (PDT)
- In-reply-to: <Pine.LNX.4.61.0408080903110.16667@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <Pine.LNX.4.61.0408080903110.16667@xxxxxxxxxxxxxxxxxx>
- Reply-to: zsh-workers@xxxxxxxxxx
On Sun, 8 Aug 2004, Bart Schaefer wrote:
> Index: Functions/Misc/zed
> ===================================================================
> if [[ $var = *\#\ undefined* ]] then
> autoload +X $1
> + var="$(functions $1)"
Actually I don't like this. It used to be the case that, if one aborted
zed -f of an autoloaded function, the function remained undefined. The
new behavior loads the function unconditionally.
So I propose this instead:
Index: Functions/Misc/zed
===================================================================
RCS file: /cvsroot/zsh/zsh/Functions/Misc/zed,v
retrieving revision 1.8
diff -u -r1.8 zed
--- Functions/Misc/zed 23 Jun 2004 16:14:27 -0000 1.8
+++ Functions/Misc/zed 8 Aug 2004 16:49:06 -0000
@@ -74,7 +74,7 @@
var="$(functions $1)"
# If function is undefined but autoloadable, load it
if [[ $var = *\#\ undefined* ]] then
- autoload +X $1
+ var="$(autoload +X $1; functions $1)"
elif [[ -z $var ]] then
var="$1() {
}"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author