Skip to content

Commit d95989f

Browse files
committed
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. (cherry picked from commit 20ed583) (cherry picked from commit dd349a0) (cherry picked from commit 83548e2)
1 parent 11c53ec commit d95989f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shell-completion/bash/coredumpctl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ _coredumpctl() {
4747
[DUMP]='dump debug'
4848
)
4949

50-
if __contains_word "$prev" '--output -o'; then
50+
if __contains_word "$prev" --output -o; then
5151
comps=$( compgen -A file -- "$cur" )
5252
compopt -o filenames
53-
elif __contains_word "$prev" '-D --directory'; then
53+
elif __contains_word "$prev" -D --directory; then
5454
comps=$( compgen -A directory -- "$cur" )
5555
compopt -o filenames
5656
elif __contains_word "$prev" '--debugger'; then
5757
comps=$( compgen -A command -- "$cur" )
5858
compopt -o filenames
59-
elif __contains_word "$prev" '--field -F'; then
59+
elif __contains_word "$prev" --field -F; then
6060
comps=$( compgen -W '${__journal_fields[*]}' -- "$cur" )
6161
elif __contains_word "$prev" '--json'; then
6262
comps=$( compgen -W 'pretty short off' -- "$cur" )

0 commit comments

Comments
 (0)