Merge pull request #18542 from yuwata/bash-completion-update

bash-completion: add missing options
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-02-10 19:31:11 +01:00
committed by GitHub
2 changed files with 5 additions and 3 deletions
+3 -1
View 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[*]} &&
+2 -2
View File
@@ -43,7 +43,7 @@ _loginctl () {
[STANDALONE]='--all -a --help -h --no-pager --version
--no-legend --no-ask-password -l --full --value'
[ARG]='--host -H --kill-who --property -p --signal -s -M --machine
-n --lines -o --output'
-n --lines -o --output -P'
)
if __contains_word "$prev" ${OPTS[ARG]}; then
@@ -61,7 +61,7 @@ _loginctl () {
--machine|-M)
comps=$( __get_machines )
;;
--property|-p)
--property|-p|-P)
comps=''
;;
--output|-o)