]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/fstrim
logger: make socket initialization in main() more readable
[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 ;;
12 esac
13 case $cur in
14 -*)
15 OPTS="-o --offset -l --length -m --minimum -v --verbose -h --help -V --version"
16 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
17 return 0
18 ;;
19 esac
20 local MPOINTS
21 MPOINTS=$(findmnt -rno SOURCE | grep ^/dev)
22 COMPREPLY=( $(compgen -W "$MPOINTS" -- $cur) )
23 return 0
24}
25complete -F _fstrim_module fstrim