about summary refs log tree commit diff
path: root/Functions/Calendar/calendar_edit
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-03-09 11:01:20 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-03-09 11:01:20 +0000
commit00e507fc0eb53fb00f34e55cd89bef4cfffa8663 (patch)
treee554eb6afda593d1b1f94e2d8c6d6939c593cb0f /Functions/Calendar/calendar_edit
parente050b88b970591f9c6eae2230520a0ddd12589ec (diff)
downloadzsh-00e507fc0eb53fb00f34e55cd89bef4cfffa8663.tar.gz
zsh-00e507fc0eb53fb00f34e55cd89bef4cfffa8663.tar.xz
zsh-00e507fc0eb53fb00f34e55cd89bef4cfffa8663.zip
unposted: fix calendar bug updating repeating events
allow calendar_edit to take arguments for editor
Diffstat (limited to 'Functions/Calendar/calendar_edit')
-rw-r--r--Functions/Calendar/calendar_edit9
1 files changed, 7 insertions, 2 deletions
diff --git a/Functions/Calendar/calendar_edit b/Functions/Calendar/calendar_edit
index e3ac5c39b..430c3b2e9 100644
--- a/Functions/Calendar/calendar_edit
+++ b/Functions/Calendar/calendar_edit
@@ -1,9 +1,14 @@
-local editor=${VISUAL:-${EDITOR:-vi}}
 local line calendar
-local -a lockfiles
+local -a lockfiles editor
 
 integer cal_running
 
+if (( $# )); then
+  editor=("$@")
+else
+  editor=(${VISUAL:-${EDITOR:-vi}})
+fi
+
 sched | while read line; do
   [[ $line = *" calendar -s "<->" "<-> ]] && (( cal_running = 1 ))
 done