]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bash-completion: coredumpctl: add --json and -n options
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 10 Feb 2021 17:50:22 +0000 (02:50 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 10 Feb 2021 17:50:54 +0000 (02:50 +0900)
shell-completion/bash/coredumpctl

index aef863b02012c555cee7675aa12381cd425db01d..5fc11fdbd289acdbbbf28075c47274d986c57408 100644 (file)
@@ -40,7 +40,7 @@ _coredumpctl() {
     local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
     local OPTS='-h --help --version --no-pager --no-legend -o --output -F --field -1
                 -r --reverse -S --since -U --until -D --directory -q --quiet --debugger
-                -A --debugger-arguments'
+                -A --debugger-arguments --json -n'
 
     local -A VERBS=(
         [LIST]='list info'
@@ -58,6 +58,8 @@ _coredumpctl() {
         compopt -o filenames
     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" )
     elif [[ $cur = -* ]]; then
         comps=${OPTS}
     elif __contains_word "$prev" ${VERBS[*]} &&