]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/fsfreeze
rev: be careful with close()
[thirdparty/util-linux.git] / bash-completion / fsfreeze
1 _fsfreeze_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 '-h'|'--help'|'-V'|'--version')
9 return 0
10 ;;
11 esac
12 case $cur in
13 -*)
14 OPTS="--freeze --unfreeze --help --version"
15 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
16 return 0
17 ;;
18 esac
19 local MPOINT
20 MPOINT="$(findmnt -t ext2,ext3,ext4,reiserfs,jfs,xfs -o TARGET -n -r)"
21 COMPREPLY=( $(compgen -W "$MPOINT" -- $cur) )
22 return 0
23 }
24 complete -F _fsfreeze_module fsfreeze