summaryrefslogtreecommitdiffstats
path: root/shell-completion
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2024-06-12 14:35:34 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-06-12 17:03:25 +0200
commitbde35f4a91663ebb854330f582baeef0f9adcbfb (patch)
treeedbfca8e8147a6a010d383c2d50fa0e58f656642 /shell-completion
parentMerge pull request #33287 from bluca/release_doc (diff)
downloadsystemd-bde35f4a91663ebb854330f582baeef0f9adcbfb.tar.xz
systemd-bde35f4a91663ebb854330f582baeef0f9adcbfb.zip
shell-completion: only offer devices for completion
This skips directories and other stuff like /dev/core, /dev/initctl or /dev/log.
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/udevadm5
1 files changed, 1 insertions, 4 deletions
diff --git a/shell-completion/bash/udevadm b/shell-completion/bash/udevadm
index 05f921cf49..3842d722e7 100644
--- a/shell-completion/bash/udevadm
+++ b/shell-completion/bash/udevadm
@@ -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() {