about summary refs log tree commit diff
path: root/Functions/Calendar
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/Calendar')
-rw-r--r--Functions/Calendar/age6
1 files changed, 3 insertions, 3 deletions
diff --git a/Functions/Calendar/age b/Functions/Calendar/age
index 8f6278fa2..2348da51a 100644
--- a/Functions/Calendar/age
+++ b/Functions/Calendar/age
@@ -36,18 +36,18 @@ autoload -Uz calendar_scandate
 local -a vals tmp
 
 [[ -e $REPLY ]] || return 1
-zstat -A vals +mtime $REPLY || return 1
+zstat -A vals +mtime -- $REPLY || return 1
 
 if (( $# >= 1 )); then
   if [[ $1 = :* ]]; then
-    zstat -A tmp -F "%Y/%m/%d" +mtime ${1[2,-1]} || return 1
+    zstat -A tmp -F "%Y/%m/%d" +mtime -- ${1#:} || return 1
     local AGEREF=$tmp[1]
   else
     local AGEREF=$1
   fi
   # if 1 argument given, never use globally defined AGEREF2
   if [[ $2 = :* ]]; then
-    zstat -A tmp -F "%Y/%m/%d" +mtime ${2[2,-1]} || return 1
+    zstat -A tmp -F "%Y/%m/%d" +mtime -- ${2#:} || return 1
     local AGEREF2=$tmp[1]
   else
     local AGEREF2=$2