about summary refs log tree commit diff
path: root/Src/hashtable.c
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2000-05-15 00:31:20 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2000-05-15 00:31:20 +0000
commit6ff206e057d46095bb21aa943c383bc76cd15036 (patch)
tree31fda7d1d727bae1121f088fe3d5392351b8fb4d /Src/hashtable.c
parent26cc1ad1dfb9ba4ffeaf6079762439822ab828ef (diff)
downloadzsh-6ff206e057d46095bb21aa943c383bc76cd15036.tar.gz
zsh-6ff206e057d46095bb21aa943c383bc76cd15036.tar.xz
zsh-6ff206e057d46095bb21aa943c383bc76cd15036.zip
Add -L option to the hash builtin
Diffstat (limited to 'Src/hashtable.c')
-rw-r--r--Src/hashtable.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/Src/hashtable.c b/Src/hashtable.c
index 917bbc9e6..9a1010ec6 100644
--- a/Src/hashtable.c
+++ b/Src/hashtable.c
@@ -734,6 +734,13 @@ printcmdnamnode(HashNode hn, int printflags)
 	return;
     }
 
+    if (printflags & PRINT_LIST) {
+	printf("hash ");
+
+	if(cn->nam[0] == '-')
+	    printf("-- ");
+    }
+
     if (cn->flags & HASHED) {
 	quotedzputs(cn->nam, stdout);
 	putchar('=');
@@ -1371,6 +1378,13 @@ printnameddirnode(HashNode hn, int printflags)
 	putchar('\n');
 	return;
     }
+    
+    if (printflags & PRINT_LIST) {
+      printf("hash -d ");
+
+      if(nd->nam[0] == '-')
+	    printf("-- ");
+    }
 
     quotedzputs(nd->nam, stdout);
     putchar('=');