From: Andreas Henriksson <andreas@fatal.se>
To: util-linux@vger.kernel.org
Cc: Ritesh Raj Sarraf <rrs@debian.org>,
Andreas Henriksson <andreas@fatal.se>
Subject: [PATCH] bash-completion: fstrim: use mountpoint, not device
Date: Thu, 12 Nov 2015 12:36:03 +0100 [thread overview]
Message-ID: <1447328163-5618-1-git-send-email-andreas@fatal.se> (raw)
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bash-completion/fstrim b/bash-completion/fstrim
index 7d3cde9..726ddd9 100644
--- a/bash-completion/fstrim
+++ b/bash-completion/fstrim
@@ -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
}
--
2.1.4
next reply other threads:[~2015-11-12 11:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 11:36 Andreas Henriksson [this message]
2015-11-13 8:52 ` [PATCH] bash-completion: fstrim: use mountpoint, not device Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1447328163-5618-1-git-send-email-andreas@fatal.se \
--to=andreas@fatal.se \
--cc=rrs@debian.org \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox