]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/fstrim
dmesg: add --follow-new
[thirdparty/util-linux.git] / bash-completion / fstrim
CommitLineData
c6f8c3f5
SK
1_fstrim_module()
2{
3 local cur prev OPTS
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
7 case $prev in
8 '-o'|'--offset'|'-l'|'--length'|'-m'|'--minimum')
9 COMPREPLY=( $(compgen -W "num" -- $cur) )
10 return 0
11 ;;
d4f9b8d7
VS
12 '-h'|'--help'|'-V'|'--version')
13 return 0
14 ;;
c6f8c3f5
SK
15 esac
16 case $cur in
17 -*)
b8446f75 18 OPTS="--all
5feae697 19 --fstab
9995da01 20 --listed-in
ef89802e 21 --quiet-unsupported
b8446f75
KZ
22 --offset
23 --length
24 --minimum
25 --verbose
5feae697 26 --dry-run
b8446f75
KZ
27 --help
28 --version"
c6f8c3f5
SK
29 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
30 return 0
31 ;;
32 esac
33 local MPOINTS
42f536ee 34 MPOINTS=$(findmnt -rno SOURCE,TARGET | awk '/^\/dev/{print $2}')
c6f8c3f5
SK
35 COMPREPLY=( $(compgen -W "$MPOINTS" -- $cur) )
36 return 0
37}
38complete -F _fstrim_module fstrim