@@ -56,6 +56,13 @@ _journalctl_boots() {
5656 "bootid:boot ids:compadd -a _bootid"
5757}
5858
59+ (( $+functions[_journalctl_facilities] )) ||
60+ _journalctl_facilities() {
61+ local -a _journalctl_facilities
62+ _journalctl_facilities=(kern user mail daemon auth syslog lpr news uucp cron authpriv ftp local0 local1 local2 local3 local4 local5 local6 local7)
63+ _describe 'possible values' _journalctl_facilities
64+ }
65+
5966# Build arguments for "journalctl" to be used in completion.
6067# Use both --user and --system modes, they are not exclusive.
6168local -a _modes; _modes=(--user --system)
@@ -103,7 +110,8 @@ _arguments -s \
103110 {-u+,--unit=}'[Show data only from the specified unit]:units:_journalctl_field_values _SYSTEMD_UNIT' \
104111 '--user-unit=[Show data only from the specified user session unit]:units:_journalctl_field_values USER_UNIT' \
105112 {-p+,--priority=}'[Show only messages within the specified priority range]:priority:_journalctl_field_values PRIORITY' \
106- {-t+,--identifier=}'[Show only messages with the specified syslog identifier]:identifier:_journalctl_field_values SYSLOG_IDENTIFIER' \
113+ '--facility=[Filter messages by facility]:facility:_journalctl_facilities' \
114+ {-t+,--identifier=}'[Filter messages by syslog identifier]:identifier:_journalctl_field_values SYSLOG_IDENTIFIER' \
107115 {-c+,--cursor=}'[Start showing entries from the specified cursor]:cursors:_journalctl_field_values __CURSORS' \
108116 '--cursor-file=[Show entries using cursor store in file]:file:_files' \
109117 '--after-cursor=[Start showing entries from after the specified cursor]:cursors:_journalctl_field_values __CURSORS' \
0 commit comments