5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
9 COMPREPLY=( $(compgen -W "=list" -- $cur) )
13 COMPREPLY=( $(compgen -W "timeout" -- $cur) )
17 COMPREPLY=( $(compgen -W "forward backward" -- $cur) )
23 COMPREPLY=( $(compgen -f -- $cur) )
28 for I in /proc/*/mountinfo; do IFS=/ read -ra ARR <<< "$I"; TID+="${ARR[2]} "; done
29 COMPREPLY=( $(compgen -W "$TID" -- $cur) )
36 while read MTAB_3RD; do
37 IFS=',' read -ra TMP_ARR <<<"$MTAB_3RD"
38 for I in ${TMP_ARR[@]}; do
41 done < <($1 -rno OPTIONS)
42 COMPREPLY=( $(compgen -W "${!MNT_OPTS[@]}" -- $cur) )
46 local prefix realcur OUTPUT_ALL OUTPUT
48 prefix="${cur%$realcur}"
50 OUTPUT_ALL="SOURCE TARGET FSTYPE OPTIONS VFS-OPTIONS
51 FS-OPTIONS LABEL UUID PARTLABEL PARTUUID
52 MAJ\:MIN ACTION OLD-TARGET OLD-OPTIONS
53 SIZE AVAIL USED USE% FSROOT TID ID
54 OPT-FIELDS PROPAGATION FREQ PASSNO"
56 for WORD in $OUTPUT_ALL; do
57 if ! [[ $prefix == *"$WORD"* ]]; then
58 OUTPUT="$WORD ${OUTPUT:-""}"
62 COMPREPLY=( $(compgen -P "$prefix" -W "$OUTPUT" -S ',' -- $realcur) )
67 TYPES="adfs affs autofs cifs coda coherent cramfs
68 debugfs devpts efs ext2 ext3 ext4 hfs
69 hfsplus hpfs iso9660 jfs minix msdos
70 ncpfs nfs nfs4 ntfs proc qnx4 ramfs
71 reiserfs romfs squashfs smbfs sysv tmpfs
72 ubifs udf ufs umsdos usbfs vfat xenix xfs"
73 COMPREPLY=( $(compgen -W "$TYPES" -- $cur) )
78 DEV_MPOINT=$($1 -rno SOURCE | grep ^/dev)
79 COMPREPLY=( $(compgen -W "$DEV_MPOINT" -- $cur) )
84 DEV_MPOINT=$($1 -rno TARGET)
85 COMPREPLY=( $(compgen -W "$DEV_MPOINT" -- $cur) )
91 COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
94 '-h'|'--help'|'-V'|'--version')
135 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
140 DEV_MPOINT=$($1 -rno TARGET,SOURCE)
141 COMPREPLY=( $(compgen -W "$DEV_MPOINT" -- $cur) )
144 complete -F _findmnt_module findmnt