summaryrefslogtreecommitdiff
path: root/bash-completion
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-10-28 12:27:27 -0400
committerDave Reisner <dreisner@archlinux.org>2012-10-28 12:27:27 -0400
commit35cdd0437d0650f7640264529417fa2f4abcce5e (patch)
tree80d56c0678b37c352182765733f42c853529d1c5 /bash-completion
parent0caa6ba9691a75ca614840f7bffaddf1d2220a9f (diff)
bash-completion: avoid usage of ls for listing devices
Diffstat (limited to 'bash-completion')
-rw-r--r--bash-completion/systemd-bash-completion.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/bash-completion/systemd-bash-completion.sh b/bash-completion/systemd-bash-completion.sh
index 4398aaaf56..8d232688cc 100644
--- a/bash-completion/systemd-bash-completion.sh
+++ b/bash-completion/systemd-bash-completion.sh
@@ -477,7 +477,10 @@ _hostnamectl() {
}
complete -F _hostnamectl hostnamectl
-__get_all_sysdevs() { ls -1 -d /sys/bus/*/devices/* /sys/class/*/*; }
+__get_all_sysdevs() {
+ local -a devs=(/sys/bus/*/devices/*/ /sys/class/*/*/)
+ printf '%s\n' "${devs[@]%/}"
+}
_udevadm() {
local i verb comps