mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-10 19:11:17 +01:00
unposted: calendar -s was broken by file locking change
This commit is contained in:
parent
c977b0125d
commit
9cfc991811
2 changed files with 19 additions and 4 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2010-03-17 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* unposted: Functions/Calendar/calendar: fix embarrassing bug in
|
||||||
|
calendar scheduling introduced by new file locking, 27756.
|
||||||
|
|
||||||
2010-03-16 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
2010-03-16 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||||
|
|
||||||
* unposted: Doc/Zsh/calsys.yo: age now uses zstat.
|
* unposted: Doc/Zsh/calsys.yo: age now uses zstat.
|
||||||
|
|
@ -12915,5 +12920,5 @@
|
||||||
|
|
||||||
*****************************************************
|
*****************************************************
|
||||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||||
* $Revision: 1.4934 $
|
* $Revision: 1.4935 $
|
||||||
*****************************************************
|
*****************************************************
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ if [[ -n $warnstr ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local myschedcmds="${TMPPREFIX:-/tmp/zsh}.sched.$$"
|
||||||
|
|
||||||
[[ -f $calendar ]] || return 1
|
[[ -f $calendar ]] || return 1
|
||||||
|
|
||||||
# We're not using getopts because we want +... to refer to a
|
# We're not using getopts because we want +... to refer to a
|
||||||
|
|
@ -394,8 +396,10 @@ fi
|
||||||
if [[ $next -ge 0 ]]; then
|
if [[ $next -ge 0 ]]; then
|
||||||
# Remove any existing calendar scheduling.
|
# Remove any existing calendar scheduling.
|
||||||
i=${"${(@)zsh_scheduled_events#*:*:}"[(I)calendar -s*]}
|
i=${"${(@)zsh_scheduled_events#*:*:}"[(I)calendar -s*]}
|
||||||
(( i )) && sched -$i
|
{
|
||||||
$sched $next calendar "${calopts[@]}" $next $next
|
(( i )) && print sched -$i
|
||||||
|
print $sched $next calendar "${calopts[@]}" $next $next
|
||||||
|
} >$myschedcmds
|
||||||
else
|
else
|
||||||
$showprog $start $stop \
|
$showprog $start $stop \
|
||||||
"No more calendar events: calendar not rescheduled.
|
"No more calendar events: calendar not rescheduled.
|
||||||
|
|
@ -427,4 +431,10 @@ Old calendar left in $calendar.old." >&2
|
||||||
}
|
}
|
||||||
|
|
||||||
exit $rstat
|
exit $rstat
|
||||||
)
|
) && {
|
||||||
|
# Tasks that need to be in the current shell
|
||||||
|
if [[ -f $myschedcmds ]]; then
|
||||||
|
. $myschedcmds
|
||||||
|
rm -f $myschedcmds
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue