summary refs log tree commit diff
path: root/Completion/Builtins/_sched
blob: 98ecb36429c7d5db1f99f8d6e4d052ea6466d260 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#compdef sched

local expl lines disp

if [[ CURRENT -eq 2 ]]; then
  if compset -P -; then
    _wanted -C - jobs || return 1

    lines=(${(f)"$(sched)"})
    if zstyle -T ":completion:${curcontext}:jobs" verbose; then
      disp=( -ld lines )
    else
      disp=()
    fi
    [[ -z $lines ]] || _all_labels jobs expl 'scheduled jobs' \
                           compadd "$disp[@]" - {1..$#lines}
    return
  else
    _message 'time specification'
    return 1
  fi
fi
compset -n 3 && _normal