about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-07-31 14:35:52 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-07-31 14:35:52 +0000
commiteedfdb916a2ee53e0f561f0c16f9961f775a037c (patch)
treeb9a59d4dce6729cacc5c6e6c09223598d08075ba
parent6c60a8ec79600990007f7a73ddbebfb5d9c95ada (diff)
downloadzsh-eedfdb916a2ee53e0f561f0c16f9961f775a037c.tar.gz
zsh-eedfdb916a2ee53e0f561f0c16f9961f775a037c.tar.xz
zsh-eedfdb916a2ee53e0f561f0c16f9961f775a037c.zip
23733: zmodload -LaF didn't include unloaded modules
-rw-r--r--ChangeLog3
-rw-r--r--Src/module.c2
-rw-r--r--Test/V01zmodload.ztst5
3 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 02497f496..46174124c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2007-07-31  Peter Stephenson  <pws@csr.com>
 
+	* 23733: Src/module.c, Test/V01zmodload.ztst: zmodload -LaF
+	didn't include unloaded modules, making it a bit pointless.
+
 	* 23732: Src/exec.c, Test/B02tyepset.ztst: unknown builtin
 	error message was broken; test warning output was broken;
 	exec of zsh in new env test was broken.
diff --git a/Src/module.c b/Src/module.c
index c3785e609..a89010d74 100644
--- a/Src/module.c
+++ b/Src/module.c
@@ -215,7 +215,7 @@ printmodulenode(HashNode hn, int flags)
 	    fputs(" -> ", stdout);
 	    nicezputs(m->u.alias, stdout);
 	}
-    } else if (m->u.handle) {
+    } else if (m->u.handle || (flags & PRINTMOD_AUTO)) {
 	/*
 	 * Loaded module.
 	 */
diff --git a/Test/V01zmodload.ztst b/Test/V01zmodload.ztst
index cbfde12d6..a51535791 100644
--- a/Test/V01zmodload.ztst
+++ b/Test/V01zmodload.ztst
@@ -260,6 +260,11 @@
  zmodload zsh/parameter
 0d:Unload the modules loaded by this test suite
 
+  zmodload -aF zsh/zftp b:zftp
+  zmodload -LaF | grep zftp
+0:Listing feature autoloads includes unloaded modules
+>zmodload -Fa zsh/zftp b:zftp
+
 %clean
 
  eval "$deps"