ACC SHELL

Path : /usr/share/zsh/4.3.10/functions/
File Upload :
Current File : //usr/share/zsh/4.3.10/functions/calendar_edit

local editor=${VISUAL:-${EDITOR:-vi}}
local line calendar
local -a lockfiles

integer cal_running

sched | while read line; do
  [[ $line = *" calendar -s "<->" "<-> ]] && (( cal_running = 1 ))
done

zstyle -s ':datetime:calendar:' calendar-file calendar || calendar=~/calendar

{
  calendar_lockfiles $calendar || return 1

  eval $editor \$calendar
} always {
  (( ${#lockfiles} )) && rm -f $lockfiles
}

(( cal_running )) && calendar -s

ACC SHELL 2018