summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2023-04-25 15:30:00 +0100
committerLuca Boccassi <bluca@debian.org>2023-04-29 18:47:34 +0100
commit20ed583e35cd30ad06c14a0ba833e71c4ca69b48 (patch)
tree6a883c5370201d64150d271a9fef351b82e42890 /shell-completion
parent992e06df085e3a7a881d25d6f83b9e98efbbb7ca (diff)
downloadsystemd-20ed583e35cd30ad06c14a0ba833e71c4ca69b48.tar.gz
coredumpctl: fix bash completion matching
When multi-word matching string is quoted, __contains_word compares it as a whole to the passed option, so it doesn't work.
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/coredumpctl6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell-completion/bash/coredumpctl b/shell-completion/bash/coredumpctl
index 5416e9e58a..3a02744541 100644
--- a/shell-completion/bash/coredumpctl
+++ b/shell-completion/bash/coredumpctl
@@ -47,16 +47,16 @@ _coredumpctl() {
[DUMP]='dump debug'
)
- if __contains_word "$prev" '--output -o'; then
+ if __contains_word "$prev" --output -o; then
comps=$( compgen -A file -- "$cur" )
compopt -o filenames
- elif __contains_word "$prev" '-D --directory'; then
+ elif __contains_word "$prev" -D --directory; then
comps=$( compgen -A directory -- "$cur" )
compopt -o filenames
elif __contains_word "$prev" '--debugger'; then
comps=$( compgen -A command -- "$cur" )
compopt -o filenames
- elif __contains_word "$prev" '--field -F'; then
+ elif __contains_word "$prev" --field -F; then
comps=$( compgen -W '${__journal_fields[*]}' -- "$cur" )
elif __contains_word "$prev" '--json'; then
comps=$( compgen -W 'pretty short off' -- "$cur" )