1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01:00

23560: improve $zsh_scheduled_events to make it easier to parse

This commit is contained in:
Peter Stephenson 2007-06-14 13:25:58 +00:00
parent 7eeb606599
commit a016fed99f
4 changed files with 46 additions and 48 deletions

View file

@ -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 \