about summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-01-10 18:53:49 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-01-10 18:53:49 +0000
commitb24d545294507a5af5a63880282247042d934c9e (patch)
tree5ac137d80b21f2381cff5eba0dbdb325ae9aa444 /Functions
parented5c4c8e53fce85c1f450c6493b888e4dc223dcf (diff)
downloadzsh-b24d545294507a5af5a63880282247042d934c9e.tar.gz
zsh-b24d545294507a5af5a63880282247042d934c9e.tar.xz
zsh-b24d545294507a5af5a63880282247042d934c9e.zip
users/12412: check for extra arguments in test and [
Diffstat (limited to 'Functions')
-rw-r--r--Functions/Calendar/calendar_add7
1 files changed, 6 insertions, 1 deletions
diff --git a/Functions/Calendar/calendar_add b/Functions/Calendar/calendar_add
index e8c535d59..04401bc9f 100644
--- a/Functions/Calendar/calendar_add
+++ b/Functions/Calendar/calendar_add
@@ -74,7 +74,7 @@ fi
 	if [[ -n $reply[rpttime] && $line = ${~uidpat} ]]; then
 	  # Yes, so record this as a recurring event.
 	  their_uid=${(U)match[1]}
-	  recurring_uids[$their_uid]=1
+	  recurring_uids[$their_uid]=$reply[time]
 	fi
       done
     fi
@@ -113,6 +113,11 @@ fi
 	      # No, so assume this is a straightforward replacement
 	      # of a non-recurring event.
 	      (( ! old_recurring )) && continue
+	      # It's recurring, but if this is a one-off at the
+	      # same time as the previous one, replace anyway.
+	      [[ -z $parse_old[$rpttime] ]] &&
+	        (( ${parse_new[time]} == ${parse_old[time]} )) &&
+		continue
 	    fi
 	  fi
 	fi