From acb97e611501c92cc176b2ca130ffab00cb6299d Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 11 Dec 2011 17:22:59 +0000 Subject: 29991: allow explicit "d" for days in time qualifiers --- ChangeLog | 7 ++++++- Doc/Zsh/expn.yo | 3 ++- Src/glob.c | 2 ++ 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 + + * 29991: Doc/Zsh/expn.yo, Src/glob.c: allow explicit 'd' for + days in time qualifiers. + 2011-12-10 Mikael Magnusson * 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)) -- cgit 1.4.1