File: dupd.bash-completion

package info (click to toggle)
dupd 1.7.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,696 kB
  • sloc: ansic: 8,381; sh: 879; makefile: 131; perl: 58
file content (35 lines) | stat: -rwxr-xr-x 885 bytes parent folder | download
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
28
29
30
31
32
33
34
35
# bash completion for dupd(1)

_dupd() {
  local cur prev words

  _get_comp_words_by_ref cur prev

  case ${COMP_WORDS[1]} in
    scan)
      words="-p --path -m --minsize --buflimit -X --one-file-system --hidden -I --hardlink-is-unique --stats-file"
      ;;
    report)
      words="-m --minsize --cut --format"
      ;;
    file)
      words="--file --cut --exclude --hardlink-is-unique"
      ;;
    ls|dups|uniques)
      words="-p --path --cut --exclude --hardlink-is-unique"
      ;;
    rmsh)
      words="--link --hardlink"
      ;;
    *)
      if [[ ${cur} == -* ]] ; then
        words="-d --db -F --hash -v --verbose -V --verbose-level -q --quiet -h --help"
      else
        words="scan report file ls dups uniques refresh validate rmsh help usage man license version"
      fi
      ;;
  esac
  COMPREPLY=($(compgen -W "${words}" -- ${cur}))
}

complete -F _dupd dupd