From 53154dae39cd16924c97754589ed5396a91946bd Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 26 Oct 2014 22:07:08 +0000 Subject: bash-completion: stop being clever when listing block devices Various commands such as blkid, cfdisk, fdisk, delpart, and so on listed only partitions and missed for example disks and volume groups. The right thing to do is to list all block devices in all for all commands performing operations with them. This might occasionally list unexpected devices that I think is lesser bad than missing some. Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764488 Signed-off-by: Sami Kerola --- bash-completion/fsck | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bash-completion/fsck') diff --git a/bash-completion/fsck b/bash-completion/fsck index 04899a0d1..d61b37f42 100644 --- a/bash-completion/fsck +++ b/bash-completion/fsck @@ -32,8 +32,7 @@ _fsck_module() return 0 ;; esac - while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name) - COMPREPLY=( $(compgen -W "$DEVS" -- $cur) ) + COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) ) return 0 } complete -F _fsck_module fsck -- cgit v1.2.3-55-g7522