1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-08-04 12:22:39 +03:00

completion/hostnamectl: do not dereference non-existing OPTS[ARGUNKNOWN]

This commit is contained in:
Luca Boccassi
2021-06-22 14:54:08 +01:00
parent abfbfee36c
commit df7ca94009

View File

@ -39,7 +39,7 @@ _hostnamectl() {
[ARG]='-H --host -M --machine --json'
)
if __contains_word "$prev" ${OPTS[ARG]} ${OPTS[ARGUNKNOWN]}; then
if __contains_word "$prev" ${OPTS[ARG]}; then
case $prev in
--host|-H)
comps=$(compgen -A hostname)