]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/mountpoint
rev: be careful with close()
[thirdparty/util-linux.git] / bash-completion / mountpoint
CommitLineData
c6f8c3f5
SK
1_mountpoint_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
d4f9b8d7
VS
8 '-h'|'--help'|'-V'|'--version')
9 return 0
10 ;;
c6f8c3f5
SK
11 esac
12 case $cur in
13 -*)
0d5b9b8a 14 OPTS="--quiet --fs-devno --devno --help --version"
c6f8c3f5
SK
15 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
16 return 0
17 ;;
18 esac
ce3e6b15 19 local IFS=$'\n'
c6f8c3f5
SK
20 compopt -o filenames
21 COMPREPLY=( $(compgen -f -- ${cur:-"/"}) )
22 return 0
23}
24complete -F _mountpoint_module mountpoint