summarylogtreecommitdiffstats
path: root/spigot.bash
blob: 4ee41222874085031e6339f6c0b74a4c11066bd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
_spigot() {
  local cur prev words cword
  _init_completion || return

  case "$prev" in
  --help | --version | --licence) return ;;

  --tentative)
    COMPREPLY=($(compgen -W 'on off auto' -- "$cur"))
    return
    ;;

  -[bB])
    COMPREPLY=($(compgen -W '{2..36}' -- "$cur"))
    return
    ;;
  esac

  if [[ $cur == -* ]]; then
    COMPREPLY=($(compgen -W '$(_parse_help "$1" --help) --printf --rz --ri --ru --rd --rn --rno --rnz --rni --rnu --rnd --tentative --safe --version --help --licence' -- "$cur"))
    return
  fi

  _filedir
} && complete -F _spigot spigot

# vim: sw=2 sts=2 et ai ft=bash