chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bash-completion: use a better definition of __contains_word
[elogind.git]
/
shell-completion
/
bash
/
udevadm
diff --git
a/shell-completion/bash/udevadm
b/shell-completion/bash/udevadm
index e9ad1792034ce787098fa13001a90bce7fc4d088..e521a3bbb696c47fa4fdefa3ee32edf2c036b893 100644
(file)
--- a/
shell-completion/bash/udevadm
+++ b/
shell-completion/bash/udevadm
@@
-18,9
+18,10
@@
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
__contains_word () {
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
__contains_word () {
- local word=$1; shift
- for w in $*; do [[ $w = $word ]] && return 0; done
- return 1
+ local w word=$1; shift
+ for w in "$@"; do
+ [[ $w = "$word" ]] && return
+ done
}
__get_all_sysdevs() {
}
__get_all_sysdevs() {