Commit Diff


commit - 46199d113e9b607ecb42601246103ded683ca09e
commit + 8a7509066422b70655bebea156834cad6b76a86f
blob - e4c950c5ed92a8d1d3f850e94bb2ea3d9a94a89c
blob + edaf11cfb7af974847ac1b5c4bfb3c544cba43cf
--- man/man1/ls.1
+++ man/man1/ls.1
@@ -111,13 +111,24 @@ interpreted
 as follows:
 the first character is
 .TP
-.B  d
+.B d
 if the entry is a directory;
-.PD 0
 .TP
-.B  a
+.B a
 if the entry is an append-only file;
 .TP
+.B D
+if the entry is a Unix device;
+.TP
+.B L
+if the entry is a symbolic link;
+.TP
+.B P
+if the entry is a named pipe;
+.TP
+.B S
+if the entry is a socket;
+.TP
 .B  -
 if the entry is a plain file.
 .PD
blob - 8d796354e09c47aecce19fd1d2aebd38ccdda18a
blob + 790b5fa057cb46a652b11bb0413f75c06ff83971
--- src/lib9/dirmodefmt.c
+++ src/lib9/dirmodefmt.c
@@ -33,6 +33,14 @@ dirmodefmt(Fmt *f)
 		buf[0]='a';
 	else if(m & DMAUTH)
 		buf[0]='A';
+	else if(m & DMDEVICE)
+		buf[0] = 'D';
+	else if(m & DMSYMLINK)
+		buf[0] = 'L';
+	else if(m & DMSOCKET)
+		buf[0] = 'S';
+	else if(m & DMNAMEDPIPE)
+		buf[0] = 'P';
 	else
 		buf[0]='-';
 	if(m & DMEXCL)