* PATCH: Bug in "zed" with autoloaded functions
@ 2004-08-08 16:08 Bart Schaefer
2004-08-08 16:51 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 2004-08-08 16:08 UTC (permalink / raw)
To: zsh-workers
This used to work:
autoload foo
zed -f foo
It doesn't any more. The bug was introduced in zsh-workers/20089.
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:06:44 -0000
@@ -75,6 +75,7 @@
# If function is undefined but autoloadable, load it
if [[ $var = *\#\ undefined* ]] then
autoload +X $1
+ var="$(functions $1)"
elif [[ -z $var ]] then
var="$1() {
}"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: PATCH: Bug in "zed" with autoloaded functions
2004-08-08 16:08 PATCH: Bug in "zed" with autoloaded functions Bart Schaefer
@ 2004-08-08 16:51 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2004-08-08 16:51 UTC (permalink / raw)
To: zsh-workers
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() {
}"
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-08-08 16:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-08 16:08 PATCH: Bug in "zed" with autoloaded functions Bart Schaefer
2004-08-08 16:51 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).