From a016fed99f33d040c18515cc749f98a254b5a7e5 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 14 Jun 2007 13:25:58 +0000 Subject: 23560: improve $zsh_scheduled_events to make it easier to parse --- Functions/Calendar/calendar | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Functions') diff --git a/Functions/Calendar/calendar b/Functions/Calendar/calendar index 08903d04c..b3cb58425 100644 --- a/Functions/Calendar/calendar +++ b/Functions/Calendar/calendar @@ -352,13 +352,8 @@ fi if [[ -n $sched ]]; then if [[ $next -ge 0 ]]; then # Remove any existing calendar scheduling. - # Luckily sched doesn't delete its schedule in a subshell. - sched | while read line; do - if [[ $line = (#b)[[:space:]]#(<->)[[:space:]]##*[[:space:]]'calendar -s'* ]]; then - # End of pipeline run in current shell, so delete directly. - sched -1 $match[1] - fi - done + i=${"${(@)zsh_scheduled_events#*:*:}"[(I)calendar -s*]} + (( i )) && sched -$i $sched $next calendar "${calopts[@]}" $next $next else $showprog $start $stop \ -- cgit 1.4.1