1999-04-15 20:25:40 +02:00
|
|
|
#compdef sched
|
1999-04-15 20:17:36 +02:00
|
|
|
|
1999-11-12 16:28:24 +01:00
|
|
|
local expl lines disp
|
1999-10-21 13:39:13 +02:00
|
|
|
|
1999-08-19 13:18:05 +02:00
|
|
|
if [[ CURRENT -eq 2 ]]; then
|
1999-10-21 13:39:13 +02:00
|
|
|
if compset -P -; then
|
2000-03-23 05:19:26 +01:00
|
|
|
_wanted -C - jobs || return 1
|
1999-11-12 16:28:24 +01:00
|
|
|
|
1999-10-21 13:39:13 +02:00
|
|
|
lines=(${(f)"$(sched)"})
|
2000-02-15 10:07:09 +01:00
|
|
|
if zstyle -T ":completion:${curcontext}:jobs" verbose; then
|
1999-11-12 16:28:24 +01:00
|
|
|
disp=( -ld lines )
|
|
|
|
else
|
|
|
|
disp=()
|
|
|
|
fi
|
2000-03-23 05:19:26 +01:00
|
|
|
[[ -z $lines ]] || _loop jobs expl 'scheduled jobs' \
|
|
|
|
compadd "$disp[@]" - {1..$#lines}
|
|
|
|
return
|
1999-10-21 13:39:13 +02:00
|
|
|
else
|
|
|
|
_message 'time specification'
|
|
|
|
return 1
|
|
|
|
fi
|
1999-08-19 13:18:05 +02:00
|
|
|
fi
|
1999-04-15 20:24:09 +02:00
|
|
|
compset -n 3 && _normal
|