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

Re: Missing "--" in the "age" function

On Tue, 21 May 2013 12:53:32 +0100
Stephane Chazelas <stephane.chazelas@xxxxxxxxx> wrote:
> Also, the business about $1/$2 (not $AGEREF/$AGEREF2!) starting
> with ":" to mean take the date (not time!) from reference files
> seems not to be documented.

I can't remember if I meant people to use it, but I suppose I did.

diff --git a/Doc/Zsh/calsys.yo b/Doc/Zsh/calsys.yo
index 259eb23..b3eb454 100644
--- a/Doc/Zsh/calsys.yo
+++ b/Doc/Zsh/calsys.yo
@@ -651,16 +651,24 @@ date specification must be quoted to ensure tt(age) receives the correct
 arguments, hence the use of the additional colon to separate the date and
 print *+LPAR()PLUS()age+RPAR())
 This shows the same example before using another form of argument
-passing.  The dates and times in the parameters tt(AGEREF1) and tt(AGEREF2)
+passing.  The dates and times in the parameters tt(AGEREF) and tt(AGEREF2)
 stay in effect until unset, but will be overridden if any argument is
 passed as an explicit argument to age.  Any explicit argument
 causes both parameters to be ignored.
+Instead of an explicit date and time, it's possible to use the
+modification time of a file as the date and time for either argument
+by introducing the file name with a colon:
+example(print *+LPAR()e-age :file1 :file2-+RPAR())
+This matches all files modified no earlier than tt(file1) and
+no later than tt(file2).
 texinode(Calendar Styles)(Calendar Utility Functions)(Calendar System User Functions)(Calendar Function System)
diff --git a/Functions/Calendar/age b/Functions/Calendar/age
index 2348da5..c636bdf 100644
--- a/Functions/Calendar/age
+++ b/Functions/Calendar/age
@@ -18,7 +18,7 @@
 # are allowed, but whitespace must be quoted to ensure age receives
 # the correct arguments.
-#   AGEREF1=2006/10/04:10:15
+#   AGEREF=2006/10/04:10:15
 #   AGEREF2=2006/10/04:10:45
 #   print *(+age)


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