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) )
22 COMPREPLY=( $(compgen -f -- $cur) )
27 for I in /proc/*/mountinfo; do IFS=/ read -ra ARR <<< "$I"; TID+="${ARR[2]} "; done
28 COMPREPLY=( $(compgen -W "$TID" -- $cur) )
35 while read MTAB_3RD; do
36 IFS=',' read -ra TMP_ARR <<<"$MTAB_3RD"
37 for I in ${TMP_ARR[@]}; do
40 done < <(findmnt -rno OPTIONS)
41 COMPREPLY=( $(compgen -W "$(echo ${!MNT_OPTS[@]})" -- $cur) )
45 # FIXME: how to append to a string with compgen?
47 OUTPUT="SOURCE TARGET FSTYPE OPTIONS VFS-OPTIONS
48 FS-OPTIONS LABEL UUID PARTLABEL PARTUUID
49 MAJ\:MIN ACTION OLD-TARGET OLD-OPTIONS
50 SIZE AVAIL USED USE% FSROOT TID ID
51 OPT-FIELDS PROPAGATION FREQ PASSNO"
53 COMPREPLY=( $(compgen -W "$OUTPUT" -S ',' -- $cur) )
58 TYPES="adfs affs autofs cifs coda coherent cramfs
59 debugfs devpts efs ext ext2 ext3 ext4 hfs
60 hfsplus hpfs iso9660 jfs minix msdos
61 ncpfs nfs nfs4 ntfs proc qnx4 ramfs
62 reiserfs romfs squashfs smbfs sysv tmpfs
63 ubifs udf ufs umsdos usbfs vfat xenix xfs
65 COMPREPLY=( $(compgen -W "$TYPES" -- $cur) )
70 DEV_MPOINT=$(findmnt -rno SOURCE | grep ^/dev)
71 COMPREPLY=( $(compgen -W "$DEV_MPOINT" -- $cur) )
76 DEV_MPOINT=$(findmnt -rno TARGET)
77 COMPREPLY=( $(compgen -W "$DEV_MPOINT" -- $cur) )
80 '-h'|'--help'|'-V'|'--version')
115 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
120 DEV_MPOINT=$(findmnt -rno TARGET,SOURCE)
121 COMPREPLY=( $(compgen -W "$DEV_MPOINT" -- $cur) )
124 complete -F _findmnt_module findmnt