5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
9 local prefix realcur TYPES
11 $(\ls /lib/modules/$(uname -r)/kernel/fs | awk '{print $1, "no" $1}')
12 $(awk '{print $NF, "no" $NF}' /proc/filesystems)
15 prefix="${cur%$realcur}"
16 for WORD in $TYPES; do
17 if ! [[ $prefix == *"$WORD"* ]]; then
18 TYPE_COLS="$WORD $TYPE_COLS"
22 COMPREPLY=( $(compgen -P "$prefix" -W "$TYPE_COLS" -S ',' -- $realcur) )
27 LABELS="$(lsblk -o LABEL -nr)"
28 COMPREPLY=( $(compgen -W "$LABELS" -- $cur) )
33 UUIDS="$(lsblk -o UUID -nr)"
34 COMPREPLY=( $(compgen -W "$UUIDS" -- $cur) )
37 '-h'|'--help'|'-V'|'--version')
74 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
80 COMPREPLY=( $(compgen -f -- $cur) )
83 complete -F _mount_module mount