summaryrefslogtreecommitdiffstats
path: root/Src/hashtable.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-10-25 09:34:23 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-10-25 09:34:23 +0000
commit1fe3b5622443f16f1d64a250a648db595090670a (patch)
tree8ae49f263de648900eb54ef85beeee410e18df22 /Src/hashtable.c
parentzsh-workers/8400 (diff)
downloadzsh-1fe3b5622443f16f1d64a250a648db595090670a.tar
zsh-1fe3b5622443f16f1d64a250a648db595090670a.tar.gz
zsh-1fe3b5622443f16f1d64a250a648db595090670a.tar.bz2
zsh-1fe3b5622443f16f1d64a250a648db595090670a.tar.lz
zsh-1fe3b5622443f16f1d64a250a648db595090670a.tar.xz
zsh-1fe3b5622443f16f1d64a250a648db595090670a.tar.zst
zsh-1fe3b5622443f16f1d64a250a648db595090670a.zip
zsh-workers/8404
Diffstat (limited to 'Src/hashtable.c')
-rw-r--r--Src/hashtable.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/Src/hashtable.c b/Src/hashtable.c
index 7a533d98a..86258e66f 100644
--- a/Src/hashtable.c
+++ b/Src/hashtable.c
@@ -872,21 +872,29 @@ printshfuncnode(HashNode hn, int printflags)
}
if (f->flags & PM_UNDEFINED)
- printf("undefined ");
- if (f->flags & PM_TAGGED)
- printf("traced ");
- if ((f->flags & PM_UNDEFINED) || !f->funcdef) {
- nicezputs(f->nam, stdout);
- printf(" () { }\n");
- return;
+ t = tricat("builtin autoload -X",
+ ((f->flags & PM_UNALIASED)? "U" : ""),
+ ((f->flags & PM_TAGGED)? "t" : ""));
+ else {
+ if (!f->funcdef)
+ t = 0;
+ else
+ t = getpermtext((void *) f->funcdef);
}
-
- t = getpermtext((void *) f->funcdef);
+
quotedzputs(f->nam, stdout);
- printf(" () {\n\t");
- zputs(t, stdout);
- printf("\n}\n");
- zsfree(t);
+ if (t) {
+ printf(" () {\n\t");
+ if (f->flags & PM_UNDEFINED)
+ printf("%c undefined\n\t", hashchar);
+ if (f->flags & PM_TAGGED)
+ printf("%c traced\n\t", hashchar);
+ zputs(t, stdout);
+ printf("\n}\n");
+ zsfree(t);
+ } else {
+ printf(" () { }\n");
+ }
}
/**************************************/