mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
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.
This commit is contained in:
@@ -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" )
|
||||
|
||||
Reference in New Issue
Block a user