mirror of
https://github.com/systemd/systemd
synced 2024-10-14 20:17:52 +00:00
Merge pull request #30575 from arthurzam/bash
bash-completion: add some missing options
This commit is contained in:
commit
eb2afc75e0
|
@ -30,7 +30,7 @@ _systemd_cat() {
|
|||
|
||||
local -A OPTS=(
|
||||
[STANDALONE]='-h --help --version'
|
||||
[ARG]='-t --identifier -p --priority --level-prefix'
|
||||
[ARG]='-t --identifier -p --priority --stderr-priority --level-prefix'
|
||||
)
|
||||
|
||||
_init_completion || return
|
||||
|
@ -40,7 +40,7 @@ _systemd_cat() {
|
|||
--identifier|-t)
|
||||
comps=''
|
||||
;;
|
||||
--priority|-p)
|
||||
--priority|-p|--stderr-priority)
|
||||
comps='emerg alert crit err warning notice info debug'
|
||||
;;
|
||||
--level-prefix)
|
||||
|
|
|
@ -44,7 +44,7 @@ _systemd_cgls() {
|
|||
|
||||
local -A OPTS=(
|
||||
[STANDALONE]='-h --help --version --all -l --full -k --no-pager --xattr=no --cgroup-id=no'
|
||||
[ARG]='-M --machine -u --unit --user-unit'
|
||||
[ARG]='-c --cgroup-id -M --machine -u --unit --user-unit -x --xattr'
|
||||
)
|
||||
|
||||
_init_completion || return
|
||||
|
@ -57,6 +57,9 @@ _systemd_cgls() {
|
|||
--unit|-u)
|
||||
comps=$( __get_units_have_cgroup --system )
|
||||
;;
|
||||
-c|--cgroup-id|-x|--xattr)
|
||||
comps='yes no'
|
||||
;;
|
||||
--user-unit)
|
||||
comps=$( __get_units_have_cgroup --user )
|
||||
;;
|
||||
|
|
|
@ -30,9 +30,12 @@ _systemd-confext() {
|
|||
[STANDALONE]='-h --help --version
|
||||
--no-pager
|
||||
--no-legend
|
||||
--no-reload
|
||||
--force'
|
||||
[ARG]='--root
|
||||
--json'
|
||||
--json
|
||||
--noexec
|
||||
--image-policy'
|
||||
)
|
||||
|
||||
local -A VERBS=(
|
||||
|
@ -54,6 +57,12 @@ _systemd-confext() {
|
|||
--json)
|
||||
comps='pretty short off'
|
||||
;;
|
||||
--noexec)
|
||||
comps='false true'
|
||||
;;
|
||||
--image-policy)
|
||||
comps=''
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
||||
return 0
|
||||
|
|
Loading…
Reference in a new issue