summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-01-10 23:15:21 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-01-10 23:15:21 +0900
commit245c1e68021c8fe3ecfda844aef39a03b4cf1e19 (patch)
treeec7fe0d31a5cdfcd80b6635f8c22353867414a92 /shell-completion
parentcdb8ec2d374c02d3d5a0b509e6e1ffac9e48edcf (diff)
bash-completion: coredumpctl: support more options
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/coredumpctl11
1 files changed, 7 insertions, 4 deletions
diff --git a/shell-completion/bash/coredumpctl b/shell-completion/bash/coredumpctl
index 842e4943ff..bc069a7644 100644
--- a/shell-completion/bash/coredumpctl
+++ b/shell-completion/bash/coredumpctl
@@ -39,22 +39,25 @@ _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'
+ -r --reverse -S --since -U --until -D --directory -q --quiet'
local -A VERBS=(
- [LIST]='list'
+ [LIST]='list info'
[DUMP]='dump gdb'
)
if __contains_word "$prev" '--output -o'; then
comps=$( compgen -A file -- "$cur" )
compopt -o filenames
- elif __contains_word "$prev" '--FIELD -F'; then
+ elif __contains_word "$prev" '-D --directory'; then
+ comps=$( compgen -A directory -- "$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 -F --field'; then
+ ! __contains_word ${COMP_WORDS[COMP_CWORD-2]} '--output -o -D --directory -F --field'; then
compopt -o nospace
COMPREPLY=( $(compgen -W '${__journal_fields[*]}' -S= -- "$cur") )
return 0