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:
parent
7eeb606599
commit
a016fed99f
4 changed files with 46 additions and 48 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue