Skip to content

Bash completion for umount fails if mount point contains a space #539

Closed
@ttencate

Description

@ttencate

Arch Linux, util-linux version 2.30.2.

For example, the mount point /media/LUBUNTU 17_:

$ cat /proc/mounts | grep media
/dev/sdb1 /media/LUBUNTU\04017_ vfat rw,nosuid,nodev,noexec,noatime,uid=1000,gid=1000,fmask=0133,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

I type umount /media/LU<tab> and it gets completed to umount /media/LUBUNTU.

Maybe umount should take a page from the book of bash-completions and parse /proc/mounts, instead of mount output.

(I originally thought this was a bug in bash-completions, until I realized that my distro replaces its umount completion in favour of that from util-linux.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions