about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-12-11 17:22:59 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-12-11 17:22:59 +0000
commitacb97e611501c92cc176b2ca130ffab00cb6299d (patch)
treee01a6fb141908edd0b899f5182ac39ad8c557d24
parenta7794bd1532c2fc6ff984f9b743c08e9ac90a923 (diff)
downloadzsh-acb97e611501c92cc176b2ca130ffab00cb6299d.tar.gz
zsh-acb97e611501c92cc176b2ca130ffab00cb6299d.tar.xz
zsh-acb97e611501c92cc176b2ca130ffab00cb6299d.zip
29991: allow explicit "d" for days in time qualifiers
-rw-r--r--ChangeLog7
-rw-r--r--Doc/Zsh/expn.yo3
-rw-r--r--Src/glob.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 616d1d41f..46af8feb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-11  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 29991: Doc/Zsh/expn.yo, Src/glob.c: allow explicit 'd' for
+	days in time qualifiers.
+
 2011-12-10  Mikael Magnusson  <mikachu@gmail.com>
 
 	* 29962: Completion/Unix/Command/_ssh: Actually return ret.
@@ -15717,5 +15722,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5534 $
+* $Revision: 1.5535 $
 *****************************************************
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index 28d525f14..25c44f331 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -2430,7 +2430,8 @@ Files accessed more than var(n) days ago are selected by a positive var(n)
 value (tt(PLUS())var(n)).  Optional unit specifiers `tt(M)', `tt(w)',
 `tt(h)', `tt(m)' or `tt(s)' (e.g. `tt(ah5)') cause the check to be
 performed with months (of 30 days), weeks, hours, minutes or seconds
-instead of days, respectively.
+instead of days, respectively.  An explicit `tt(d)' for days is also
+allowed.
 
 Any fractional part of the difference between the access time and the
 current part in the appropriate units is ignored in the comparison.  For
diff --git a/Src/glob.c b/Src/glob.c
index 96c00dedb..076d0392a 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -1530,6 +1530,8 @@ zglob(LinkList list, LinkNode np, int nountok)
 			    g_units = TT_MONTHS, ++s;
 			else if (*s == 's')
 			    g_units = TT_SECONDS, ++s;
+			else if (*s == 'd')
+			    ++s;
 		    }
 		    /* See if it's greater than, equal to, or less than */
 		    if ((g_range = *s == '+' ? 1 : *s == '-' ? -1 : 0))