For developers it's pretty common to call "btrfs check" on a raw image
dump other than real block device.

So current _btrfs_devs() is really making things worse. Use _filedir()
to replace _btrfs_devs() so it can complete any filenames, no matter if
it's just a file or a real block device.

Signed-off-by: Qu Wenruo <w...@suse.com>
---
 btrfs-completion | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/btrfs-completion b/btrfs-completion
index ae683f4ecf61..33830e827977 100644
--- a/btrfs-completion
+++ b/btrfs-completion
@@ -6,9 +6,7 @@
 
 _btrfs_devs()
 {
-       local DEVS
-       DEVS=''; while read dev; do DEVS+="$dev "; done < <(lsblk -pnro name)
-       COMPREPLY+=( $( compgen -W "$DEVS" -- "$cur" ) )
+       _filedir
 }
 
 _btrfs_mnts()
-- 
2.18.0

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to