about summary refs log tree commit diff
path: root/Src/hashtable.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-01-11 11:26:13 +0000
committerPeter Stephenson <pws@zsh.org>2017-01-11 11:26:13 +0000
commitf26d1ba6b01a358c83f28219c7a01e546e84d2ee (patch)
tree3e8cce9450fcb337c5a36d593efde62e1941c7fb /Src/hashtable.c
parent34656ec2f00d6669cef56afdbffdd90639d7b465 (diff)
downloadzsh-f26d1ba6b01a358c83f28219c7a01e546e84d2ee.tar.gz
zsh-f26d1ba6b01a358c83f28219c7a01e546e84d2ee.tar.xz
zsh-f26d1ba6b01a358c83f28219c7a01e546e84d2ee.zip
Add features associated with autoloading a function using an absolute
path.

-d defaults to normal fpath

-r remembers the path without actually loading.  May be combined with -d.

-R does the same but it's an error if not found

-X can now take a directory path: this is used to output not yet loaded
functions that have an associated path.
Diffstat (limited to 'Src/hashtable.c')
-rw-r--r--Src/hashtable.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Src/hashtable.c b/Src/hashtable.c
index 7c3367568..2a8b58535 100644
--- a/Src/hashtable.c
+++ b/Src/hashtable.c
@@ -949,16 +949,20 @@ printshfuncnode(HashNode hn, int printflags)
 	    zoutputtab(stdout);
 	}
 	if (!t) {
-	    char *fopt = "UtTkz";
+	    char *fopt = "UtTkzc";
 	    int flgs[] = {
 		PM_UNALIASED, PM_TAGGED, PM_TAGGED_LOCAL,
-		PM_KSHSTORED, PM_ZSHSTORED, 0
+		PM_KSHSTORED, PM_ZSHSTORED, PM_CUR_FPATH, 0
 	    };
 	    int fl;;
 
 	    zputs("builtin autoload -X", stdout);
 	    for (fl=0;fopt[fl];fl++)
 		if (f->node.flags & flgs[fl]) putchar(fopt[fl]);
+	    if (f->filename) {
+		putchar(' ');
+		zputs(f->filename, stdout);
+	    }
 	} else {
 	    zputs(t, stdout);
 	    zsfree(t);