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) )
39 NAMESPACE="$(lsns --type mnt --output PATH --noheadings)"
40 COMPREPLY=( $(compgen -W "$NAMESPACE" -- $cur) )
44 COMPREPLY=( $(compgen -W "ignore append prepend replace" -- $cur) )
48 COMPREPLY=( $(compgen -W "fstab mtab disable" -- $cur) )
51 '-h'|'--help'|'-V'|'--version')
69 --options-source-force
92 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
98 COMPREPLY=( $(compgen -f -- $cur) )
101 complete -F _mount_module mount