about summary refs log tree commit diff
path: root/Src/Modules/parameter.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/Modules/parameter.c
parentf2217a01887e63ad9239b9a0e53606e233550580 (diff)
downloadzsh-1fe3b5622443f16f1d64a250a648db595090670a.tar.gz
zsh-1fe3b5622443f16f1d64a250a648db595090670a.tar.xz
zsh-1fe3b5622443f16f1d64a250a648db595090670a.zip
zsh-workers/8404
Diffstat (limited to 'Src/Modules/parameter.c')
-rw-r--r--Src/Modules/parameter.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c
index dc21298cb..91e993c73 100644
--- a/Src/Modules/parameter.c
+++ b/Src/Modules/parameter.c
@@ -424,7 +424,9 @@ getpmfunction(HashTable ht, char *name)
 
 	if ((shf = (Shfunc) shfunctab->getnode(shfunctab, name))) {
 	    if (shf->flags & PM_UNDEFINED)
-		pm->u.str = "undefined";
+		pm->u.str = tricat("builtin autoload -X",
+				   ((shf->flags & PM_UNALIASED)? "U" : ""),
+				   ((shf->flags & PM_TAGGED)? "t" : ""));
 	    else {
 		char *t = getpermtext((void *) dupstruct((void *)
 							 shf->funcdef)), *h;
@@ -467,9 +469,12 @@ scanpmfunctions(HashTable ht, ScanFunc func, int flags)
 	    if (!(hn->flags & DISABLED)) {
 		pm.nam = hn->nam;
 		if (func != scancountparams) {
-		    if (((Shfunc) hn)->flags & PM_UNDEFINED)
-			pm.u.str = "undefined";
-		    else {
+		    if (((Shfunc) hn)->flags & PM_UNDEFINED) {
+			Shfunc shf = (Shfunc) hn;
+			pm.u.str = tricat("builtin autoload -X",
+					  ((shf->flags & PM_UNALIASED)? "U" : ""),
+					  ((shf->flags & PM_TAGGED)? "t" : ""));
+		    } else {
 			char *t = getpermtext((void *)
 					      dupstruct((void *) ((Shfunc) hn)->funcdef));
 
@@ -779,7 +784,7 @@ dirssetfn(Param pm, char **x)
     PERMALLOC {
 	freelinklist(dirstack, freestr);
 	dirstack = newlinklist();
-	while (*x)
+	while (x && *x)
 	    addlinknode(dirstack, ztrdup(*x++));
     } LASTALLOC;
 }