Skip to content

Commit

Permalink
coredumpctl: add --file/--root/--image to bash completion
Browse files Browse the repository at this point in the history
  • Loading branch information
bluca committed Apr 29, 2023
1 parent 20ed583 commit 448ed94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shell-completion/bash/coredumpctl
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ _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 --json -n --all'
-A --debugger-arguments --json -n --all --file --root --image'

local -A VERBS=(
[LIST]='list info'
[DUMP]='dump debug'
)

if __contains_word "$prev" --output -o; then
if __contains_word "$prev" --output -o --file --image; then
comps=$( compgen -A file -- "$cur" )
compopt -o filenames
elif __contains_word "$prev" -D --directory; then
elif __contains_word "$prev" -D --directory --root; then
comps=$( compgen -A directory -- "$cur" )
compopt -o filenames
elif __contains_word "$prev" '--debugger'; then
Expand Down

0 comments on commit 448ed94

Please sign in to comment.