File bash-completion-mount_dir_fix.patch of Package bash-completion
Index: bash_completion/bash_completion
===================================================================
--- bash_completion.orig/bash_completion
+++ bash_completion/bash_completion
@@ -679,8 +679,12 @@ _mount()
| grep "^$cur" ) )
else
# probably Linux
- COMPREPLY=( $( awk '! /^[ \t]*#/ {if ($2 ~ /\//) print $2}' \
+ if [ $EUID -eq 0 ]; then
+ _filedir
+ else
+ COMPREPLY=( $( awk '! /^[ \t]*#/ {if ($2 ~ /\//) print $2}' \
/etc/fstab | grep "^$cur" ) )
+ fi
fi
return 0