summaryrefslogtreecommitdiffstats
path: root/shell-completion/bash
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-11-24 11:21:10 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2021-11-24 13:44:34 +0100
commit989db9b399fb69bd6b991180a1f2d801124fdbd7 (patch)
treebd9c7e71a76307274c6e07c83f798b11f4669e0b /shell-completion/bash
parentbasic/architectures: sort by name and remove duplicates (diff)
downloadsystemd-989db9b399fb69bd6b991180a1f2d801124fdbd7.tar.xz
systemd-989db9b399fb69bd6b991180a1f2d801124fdbd7.zip
shell-completion: add journalctl --facility
Fixes #21484.
Diffstat (limited to 'shell-completion/bash')
-rw-r--r--shell-completion/bash/journalctl6
1 files changed, 5 insertions, 1 deletions
diff --git a/shell-completion/bash/journalctl b/shell-completion/bash/journalctl
index 84232e83c2..9a55c2d62d 100644
--- a/shell-completion/bash/journalctl
+++ b/shell-completion/bash/journalctl
@@ -32,6 +32,7 @@ __get_machines() {
}
__syslog_priorities=(emerg alert crit err warning notice info debug)
+__syslog_facilities=(kern user mail daemon auth syslog lpr news uucp cron authpriv ftp local0 local1 local2 local3 local4 local5 local6 local7)
_journalctl() {
local field_vals= cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
@@ -44,7 +45,7 @@ _journalctl() {
--show-cursor --dmesg -k --pager-end -e -r --reverse
--utc -x --catalog --no-full --force --dump-catalog
--flush --rotate --sync --no-hostname -N --fields'
- [ARG]='-b --boot -D --directory --file -F --field -t --identifier
+ [ARG]='-b --boot -D --directory --file -F --field -t --identifier --facility
-M --machine -o --output -u --unit --user-unit -p --priority
--root --case-sensitive'
[ARGUNKNOWN]='-c --cursor --interval -n --lines -S --since -U --until
@@ -81,6 +82,9 @@ _journalctl() {
--machine|-M)
comps=$( __get_machines )
;;
+ --facility)
+ comps=${__syslog_facilities[*]}
+ ;;
--priority|-p)
comps=${__syslog_priorities[*]}
compopt -o nosort