aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2018-08-16 18:23:16 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-08-20 09:43:44 +0200
commit53956faf74b149479137437ea6e1ca2808af174b (patch)
tree548b207f87534dcb85faac6b6e4800c9ad9993f9 /shell-completion
parentRevert "sysctl.d: request ECN on both in and outgoing connections" (diff)
downloadsystemd-53956faf74b149479137437ea6e1ca2808af174b.tar.gz
systemd-53956faf74b149479137437ea6e1ca2808af174b.tar.bz2
systemd-53956faf74b149479137437ea6e1ca2808af174b.zip
shell-completion: replace "gdb" verb with "debug" for coredumpctl
Also offer --debugger option. Both to reflect changes in v239.
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/coredumpctl10
-rw-r--r--shell-completion/zsh/_coredumpctl3
2 files changed, 9 insertions, 4 deletions
diff --git a/shell-completion/bash/coredumpctl b/shell-completion/bash/coredumpctl
index 9bd9072de..f73fd272f 100644
--- a/shell-completion/bash/coredumpctl
+++ b/shell-completion/bash/coredumpctl
@@ -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
diff --git a/shell-completion/zsh/_coredumpctl b/shell-completion/zsh/_coredumpctl
index f72782066..cf24f5b36 100644
--- a/shell-completion/zsh/_coredumpctl
+++ b/shell-completion/zsh/_coredumpctl
@@ -7,7 +7,7 @@ _coredumpctl_command(){
'list:List available coredumps'
'info:Show detailed information about one or more coredumps'
'dump:Print coredump to stdout'
- 'gdb:Start gdb on a coredump'
+ 'debug:Start debugger (gdb) on a coredump'
)
if (( CURRENT == 1 )); then
_describe -t commands 'coredumpctl command' _coredumpctl_cmds
@@ -39,4 +39,5 @@ _arguments \
'--no-legend[Do not print the column headers]' \
{-h,--help}'[Show this help]' \
'--version[Show package version]' \
+ '--debugger=[Use the given debugger]' \
'*::coredumpctl commands:_coredumpctl_command'