X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=blobdiff_plain;f=shell-completion%2Fbash%2Fcoredumpctl;h=f73fd272f584efa4880448e308cfb00513eb54ef;hp=bc069a76447b4c5972719bc82685abc7fea41bed;hb=53956faf74b149479137437ea6e1ca2808af174b;hpb=4579e8ef313efe56f99a4bdd43439c508a6d49ce diff --git a/shell-completion/bash/coredumpctl b/shell-completion/bash/coredumpctl index bc069a76447..f73fd272f58 100644 --- a/shell-completion/bash/coredumpctl +++ b/shell-completion/bash/coredumpctl @@ -3,7 +3,7 @@ # # This file is part of systemd. # -# Copyright 2010 Ran Benita +# Copyright © 2010 Ran Benita # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by @@ -39,11 +39,11 @@ _coredumpctl() { local i verb comps 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' + -r --reverse -S --since -U --until -D --directory -q --quiet --debugger' local -A VERBS=( [LIST]='list info' - [DUMP]='dump gdb' + [DUMP]='dump debug' ) if __contains_word "$prev" '--output -o'; then @@ -52,12 +52,16 @@ _coredumpctl() { 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 comps=$( compgen -W '${__journal_fields[*]}' -- "$cur" ) elif [[ $cur = -* ]]; then comps=${OPTS} elif __contains_word "$prev" ${VERBS[*]} && - ! __contains_word ${COMP_WORDS[COMP_CWORD-2]} '--output -o -D --directory -F --field'; then + ! __contains_word ${COMP_WORDS[COMP_CWORD-2]} \ + '--output -o -D --directory -F --field --debugger'; then compopt -o nospace COMPREPLY=( $(compgen -W '${__journal_fields[*]}' -S= -- "$cur") ) return 0