diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-11-24 11:21:10 +0100 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2021-11-24 13:44:34 +0100 |
commit | 989db9b399fb69bd6b991180a1f2d801124fdbd7 (patch) | |
tree | bd9c7e71a76307274c6e07c83f798b11f4669e0b /shell-completion/zsh/_journalctl | |
parent | basic/architectures: sort by name and remove duplicates (diff) | |
download | systemd-989db9b399fb69bd6b991180a1f2d801124fdbd7.tar.xz systemd-989db9b399fb69bd6b991180a1f2d801124fdbd7.zip |
shell-completion: add journalctl --facility
Fixes #21484.
Diffstat (limited to '')
-rw-r--r-- | shell-completion/zsh/_journalctl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl index 90d7579cce..5dba1e7dfe 100644 --- a/shell-completion/zsh/_journalctl +++ b/shell-completion/zsh/_journalctl @@ -56,6 +56,13 @@ _journalctl_boots() { "bootid:boot ids:compadd -a _bootid" } +(( $+functions[_journalctl_facilities] )) || +_journalctl_facilities() { + local -a _journalctl_facilities + _journalctl_facilities=(kern user mail daemon auth syslog lpr news uucp cron authpriv ftp local0 local1 local2 local3 local4 local5 local6 local7) + _describe 'possible values' _journalctl_facilities +} + # Build arguments for "journalctl" to be used in completion. # Use both --user and --system modes, they are not exclusive. local -a _modes; _modes=(--user --system) @@ -103,7 +110,8 @@ _arguments -s \ {-u+,--unit=}'[Show data only from the specified unit]:units:_journalctl_field_values _SYSTEMD_UNIT' \ '--user-unit=[Show data only from the specified user session unit]:units:_journalctl_field_values USER_UNIT' \ {-p+,--priority=}'[Show only messages within the specified priority range]:priority:_journalctl_field_values PRIORITY' \ - {-t+,--identifier=}'[Show only messages with the specified syslog identifier]:identifier:_journalctl_field_values SYSLOG_IDENTIFIER' \ + '--facility=[Filter messages by facility]:facility:_journalctl_facilities' \ + {-t+,--identifier=}'[Filter messages by syslog identifier]:identifier:_journalctl_field_values SYSLOG_IDENTIFIER' \ {-c+,--cursor=}'[Start showing entries from the specified cursor]:cursors:_journalctl_field_values __CURSORS' \ '--cursor-file=[Show entries using cursor store in file]:file:_files' \ '--after-cursor=[Start showing entries from after the specified cursor]:cursors:_journalctl_field_values __CURSORS' \ |