shell-completion: add systemd-cat --namespace=
Follow-up for 45bcab66a9
Addresses https://github.com/systemd/systemd/pull/31754#discussion_r1524715062
This commit is contained in:
@@ -31,7 +31,7 @@ _systemd_cat() {
|
||||
|
||||
local -A OPTS=(
|
||||
[STANDALONE]='-h --help --version'
|
||||
[ARG]='-t --identifier -p --priority --stderr-priority --level-prefix'
|
||||
[ARG]='-t --identifier -p --priority --stderr-priority --level-prefix --namespace'
|
||||
)
|
||||
|
||||
_init_completion || return
|
||||
@@ -47,6 +47,9 @@ _systemd_cat() {
|
||||
--level-prefix)
|
||||
comps='yes no'
|
||||
;;
|
||||
--namespace)
|
||||
comps=$(journalctl --list-namespaces --output=cat 2>/dev/null)
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user