summaryrefslogtreecommitdiff
path: root/completions/bash
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2022-02-01 15:29:50 +0000
committerJulian Andres Klode <jak@debian.org>2022-02-01 15:29:50 +0000
commit22b1d03c97960c9dd4b5f4237d08903e57924644 (patch)
treea0df700d5496793306b30f51ac9fca44d54d9547 /completions/bash
parent841e66b3597936cca214a3a1ce045b2cec6abfb4 (diff)
parentc00fc9152cd2e60f875ece211bc61355a7f0d719 (diff)
Merge branch 'fix-bash-compl-cmd-comparison' into 'main'
bash-completion: Don’t misidentify short options as commands to `apt` See merge request apt-team/apt!211
Diffstat (limited to 'completions/bash')
-rw-r--r--completions/bash/apt2
1 files changed, 1 insertions, 1 deletions
diff --git a/completions/bash/apt b/completions/bash/apt
index f50636776..4c3ccbc7e 100644
--- a/completions/bash/apt
+++ b/completions/bash/apt
@@ -53,7 +53,7 @@ _apt()
local command i
for (( i=0; i < ${#words[@]}-1; i++ )); do
- if [[ ${COMMANDS[@]} =~ ${words[i]} ]]; then
+ if [[ " ${COMMANDS[*]} " == *" ${words[i]} "* ]]; then
command=${words[i]}
break
fi