diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-06-14 13:25:58 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-06-14 13:25:58 +0000 |
commit | a016fed99f33d040c18515cc749f98a254b5a7e5 (patch) | |
tree | ea1040d4063157fa37bd63e81fc65e7608d80226 /Functions/Calendar/calendar | |
parent | 7eeb60659972e0150258f59379e16b5ee2e8343f (diff) | |
download | zsh-a016fed99f33d040c18515cc749f98a254b5a7e5.tar.gz zsh-a016fed99f33d040c18515cc749f98a254b5a7e5.tar.xz zsh-a016fed99f33d040c18515cc749f98a254b5a7e5.zip |
23560: improve $zsh_scheduled_events to make it easier to parse
Diffstat (limited to 'Functions/Calendar/calendar')
-rw-r--r-- | Functions/Calendar/calendar | 9 |
1 files changed, 2 insertions, 7 deletions
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 \ |