shell-completion: only offer devices for completion

This skips directories and other stuff like /dev/core, /dev/initctl or
/dev/log.
This commit is contained in:
David Tardon 2024-06-12 14:35:34 +02:00 committed by Yu Watanabe
parent 05095e1f3f
commit bde35f4a91

View File

@ -32,10 +32,7 @@ __get_all_sysdevs() {
}
__get_all_device_nodes() {
local i
for i in /dev/* /dev/*/* /dev/*/*/*; do
echo $i
done
find /dev -xtype b -o -xtype c
}
__get_all_device_units() {