]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
completion/hostnamectl: do not dereference non-existing OPTS[ARGUNKNOWN]
authorLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 22 Jun 2021 13:54:08 +0000 (14:54 +0100)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 22 Jun 2021 13:56:47 +0000 (14:56 +0100)
shell-completion/bash/hostnamectl

index af4339111e15d2508ffa19ecf37c3760a44c2e54..0f69e23e6f86eeb08ffa9d7ce00c029329cee539 100644 (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)