]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
bash-completion: fstrim: use mountpoint, not device
authorAndreas Henriksson <andreas@fatal.se>
Thu, 12 Nov 2015 11:36:03 +0000 (12:36 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 13 Nov 2015 08:52:14 +0000 (09:52 +0100)
fstrim takes mountpoint as argument but the bash completion
was completing it to a device node.

Addresses: http://bugs.debian.org/804833
Reported-by: Ritesh Raj Sarraf <rrs@debian.org>
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
bash-completion/fstrim

index 7d3cde9dfa0fb1df2181989bc3124402ad74f737..726ddd90571d1be3d0a079464839f4802a942707 100644 (file)
@@ -27,7 +27,7 @@ _fstrim_module()
                        ;;
        esac
        local MPOINTS
-       MPOINTS=$(findmnt -rno SOURCE | grep ^/dev)
+       MPOINTS=$(findmnt -rno SOURCE,TARGET | awk '/^\/dev/{print $2}')
        COMPREPLY=( $(compgen -W "$MPOINTS" -- $cur) )
        return 0
 }