@@ -8,23 +8,23 @@ _comp_cmd_mount()
88 local cur prev words cword comp_args
99 _comp_initialize -n =: -- " $@ " || return
1010
11- local split=false
11+ local split=" "
1212 case " $prev " in
1313 -t | --types)
1414 # find /lib/modules/$(uname -r)/ -type f -path '*/fs/*.ko' -printf '%f\n' | cut -d. -f1
1515 # FIXME: no<fstype>
1616 if [[ $cur == ?* ,* ]]; then
1717 prev=" ${cur% ,* } "
1818 cur=" ${cur##* ,} "
19- split=true
19+ split=set
2020 fi
2121 COMPREPLY=($( compgen -W ' auto adfs affs autofs btrfs cifs coda
2222 cramfs davfs debugfs devpts efs ext2 ext3 ext4 fuse hfs hfsplus
2323 hpfs iso9660 jffs2 jfs minix msdos ncpfs nfs nfs4 ntfs ntfs-3g
2424 proc qnx4 ramfs reiserfs romfs squashfs smbfs sysv tmpfs ubifs
2525 udf ufs umsdos usbfs vfat xfs' -- " $cur " ) )
2626 _fstypes
27- $split && COMPREPLY=(${COMPREPLY[@]/#/ $prev ,} )
27+ [[ $split ]] && COMPREPLY=(${COMPREPLY[@]/#/ $prev ,} )
2828 return
2929 ;;
3030 --bind | -B | --rbind | -R)
@@ -74,7 +74,7 @@ _comp_cmd_mount()
7474 if [[ $cur == ?* ,* ]]; then
7575 prev=" ${cur% ,* } "
7676 cur=" ${cur##* ,} "
77- split=true
77+ split=set
7878 fi
7979 # no completion if $cur is opt=smth
8080 [[ $cur == * = * ]] && return
@@ -206,7 +206,7 @@ _comp_cmd_mount()
206206 esac
207207 # COMP_WORDBREAKS is a real pain in the ass
208208 prev=" ${prev##* ["$COMP_WORDBREAKS"]} "
209- $split && COMPREPLY=(${COMPREPLY[@]/#/ " $prev ," } )
209+ [[ $split ]] && COMPREPLY=(${COMPREPLY[@]/#/ " $prev ," } )
210210 [[ ${COMPREPLY-} == * = ]] && compopt -o nospace
211211 return
212212 ;;
0 commit comments