]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
completion/systemd-delta,-resolve: autocomplete with parameters
authorLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 22 Jun 2021 13:55:22 +0000 (14:55 +0100)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 22 Jun 2021 13:56:47 +0000 (14:56 +0100)
shell-completion/bash/systemd-delta
shell-completion/bash/systemd-resolve

index f97b6dd5b2eabbc0d22769c76c4faed5d288f34d..1a24dc07109889ab17271571e173936babb007e4 100644 (file)
@@ -48,7 +48,7 @@ _systemd-delta() {
         return 0
     fi
 
-    if [[ "$cur" = -* ]]; then
+    if [[ "$cur" = -* ]] || [[ -z ${comps-} ]]; then
         COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
         return 0
     fi
index ec43948278bf229df4b1fe49e197966378702e87..b165010b85a66e3467a0ebb54a2b3b804f6f64da 100644 (file)
@@ -71,7 +71,7 @@ _systemd-resolve() {
         return 0
     fi
 
-    if [[ "$cur" = -* ]]; then
+    if [[ "$cur" = -* ]] || [[ -z ${comps-} ]]; then
         COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
         return 0
     fi