Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: FEATURES description wrong line



On Nov 8, 12:49pm, Maddi Kopfermann wrote:
}
} I read in "FEATURES" and found some wrong line:
} 
} "ls *(om[2])  matches the two most recently modified files"
} 
} I am very thankful that this FEATURE isn't there ;)
} Would confuse me very much :)

Good catch, that matches the second-most-recently modified file.  To get
the two most recently modified, you need *(om[1,2]) ... but that's not
exemplary enough if you ask me, because it makes it appear you have to
list all the indices.

Index: FEATURES
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/FEATURES,v
retrieving revision 1.2
diff -c -r1.2 FEATURES
--- FEATURES	24 Sep 2005 17:48:33 -0000	1.2
+++ FEATURES	8 Nov 2009 17:07:22 -0000
@@ -28,7 +28,7 @@
 qualifiers in parentheses after globbing expression:
   ls *(*@)  matches executable files/directories or symlinks
   ls *(L0f.go-w.)  matches all zero-length files not group or world writable
-  ls *(om[2])  matches the two most recently modified files
+  ls *(om[1,3])  matches the three most recently modified files
 null command shorthands:
   "< file" is same as "more <file"
   "> file" is same as "cat >file"



Messages sorted by: Reverse Date, Date, Thread, Author