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/mkfs.bfs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bash-completion/mkfs.bfs') diff --git a/bash-completion/mkfs.bfs b/bash-completion/mkfs.bfs index 4f2923d4f..1bd67a068 100644 --- a/bash-completion/mkfs.bfs +++ b/bash-completion/mkfs.bfs @@ -24,8 +24,7 @@ _mkfs.bfs_module() return 0 ;; esac - while read dev; do DEVS+="$dev " ; done < <(lsblk -pnro name) - COMPREPLY=( $(compgen -W "$DEVS /path/to/file" -- $cur) ) + COMPREPLY=( $(compgen -W "$(lsblk -pnro name) /path/to/file" -- $cur) ) return 0 } complete -F _mkfs.bfs_module mkfs.bfs -- cgit v1.2.3-55-g7522