diff options
Diffstat (limited to 'completions/umount.linux')
-rw-r--r-- | completions/umount.linux | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/completions/umount.linux b/completions/umount.linux index 9bc9fcc1..28bfc9c9 100644 --- a/completions/umount.linux +++ b/completions/umount.linux @@ -18,8 +18,8 @@ _reply_compgen_array() # We also have to add another round of escaping to $cur. local ecur="$cur" - ecur="${ecur//\\/\\\\}" - ecur="${ecur//\'/\'}" + ecur=${ecur//\\/\\\\} + ecur=${ecur//\'/\\\'} # Actually generate completions. local oldifs=$IFS @@ -29,7 +29,7 @@ _reply_compgen_array() # Unescape strings in the linux fstab(5) format (with octal escapes). __linux_fstab_unescape() { - eval $1="'${!1//\'/\047}'" + eval $1="'${!1//\'/\\047}'" eval $1="'${!1/%\\/\\\\}'" eval "$1=$'${!1}'" } @@ -46,7 +46,7 @@ _linux_fstab() local fs_spec fs_file fs_other local oldifs="$IFS" while read -r fs_spec fs_file fs_other; do - if [[ $fs_spec = [#]* ]]; then continue; fi + if [[ $fs_spec == [#]* ]]; then continue; fi if [[ $1 == -L ]]; then local fs_label=${fs_spec/#LABEL=} if [[ $fs_label != "$fs_spec" ]]; then @@ -59,8 +59,8 @@ _linux_fstab() __linux_fstab_unescape fs_spec __linux_fstab_unescape fs_file IFS=$'\0' - [[ $fs_spec = */* ]] && COMPREPLY+=("$fs_spec") - [[ $fs_file = */* ]] && COMPREPLY+=("$fs_file") + [[ $fs_spec == */* ]] && COMPREPLY+=("$fs_spec") + [[ $fs_file == */* ]] && COMPREPLY+=("$fs_file") IFS=$oldifs fi done @@ -74,8 +74,8 @@ _linux_fstab() if [[ $realcur ]]; then local dirrealcur= dircur= basecur if [[ $cur == */* ]]; then - dirrealcur="${realcur%/*}/" - dircur="${cur%/*}/" + dirrealcur="${realcur%/*}/" + dircur="${cur%/*}/" fi basecur=${cur#"$dircur"} local i n=${#COMPREPLY[@]} @@ -137,4 +137,4 @@ _umount() } && complete -F _umount -o dirnames umount -# ex: ts=4 sw=4 et filetype=sh +# ex: filetype=sh |