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

local expl lines disp

if [[ CURRENT -eq 2 ]]; then
  if compset -P -; then
    _tags - - entries || return 1

    lines=(${(f)"$(sched)"})
    if _style entries description yes; then
      disp=( -ld lines )
    else
      disp=()
    fi
    _description expl 'scheduled jobs'
    [[ -z $lines ]] || compadd "$expl[@]" "$disp[@]" - {1..$#lines}
  else
    _message 'time specification'
    return 1
  fi
fi
compset -n 3 && _normal