1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-01 09:47:35 +03:00

shell-completion: only offer devices for completion

This skips directories and other stuff like /dev/core, /dev/initctl or
/dev/log.

(cherry picked from commit bde35f4a91663ebb854330f582baeef0f9adcbfb)
This commit is contained in:
David Tardon 2024-06-12 14:35:34 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 4ebcdcb136
commit 2034de6157

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() {