New options: * -e, --pager-end * -r, --reverse * -x, --catalog * -k, --dmesg * --after-cursor * --file * --root * --dump-catalog * --force
Modified options: * --this-boot -> --boot= Also reorganized the options to match the manual page, similar to systemctl. --- Using --boot now completes to something like this: wgiokas@wst420:~/git/systemd % journalctl --boot=<tab> >> boot offsets -1 -2 -3 -4 -5 -6 -7 -8 >> boot ids 044c72e6535d43a1a69c326c983f8db3 4e16c6cd6ece413d9ef2726592f2e3a5 e98663898e144e68a469ff8f595fe161 3dfaadf1e1724d37baf494eef1ec8926 7e776bf9c11e474c9c556c59e8ddc4fc ee89bf9326c445a49c5d9314733489f8 48470a7aa0984274b00837015efe799c e6e83fd5e4ee4dfab0589a5214d9fbd0 shell-completion/systemd-zsh-completion.zsh | 55 +++++++++++++++++++---------- 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/shell-completion/systemd-zsh-completion.zsh b/shell-completion/systemd-zsh-completion.zsh index e26bba2..55fcabc 100644 --- a/shell-completion/systemd-zsh-completion.zsh +++ b/shell-completion/systemd-zsh-completion.zsh @@ -73,37 +73,46 @@ _ctls() ;; journalctl) _arguments -s \ - '--since=[Start showing entries newer or of the specified date]:YYYY-MM-DD HH\:MM\:SS' \ - '--until=[Stop showing entries older or of the specified date]:YYYY-MM-DD HH\:MM\:SS' \ - {-c,--cursor=}'[Start showing entries from specified cursor]:cursors:_journal_fields __CURSORS' \ - '--system[Show system and kernel messages]' \ - '--user[Show messages from user services]' \ - {-b,--this-boot}'[Show data only from current boot]' \ - {-u,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \ - '--user-unit[Show data only from the specified user session unit]:units:_journal_fields _SYSTEMD_USER_UNIT' \ - {-p,--priority=}'[Show only messages within the specified priority range]:priority:_journal_fields PRIORITY' \ + {-h,--help}'[Show this help]' \ + '--version[Show package version]' \ + '--no-pager[Do not pipe output into a pager]' \ + {-l,--full}'[Show long fields in full]' \ + {-a,--all}'[Show all fields, including long and unprintable]' \ {-f,--follow}'[Follow journal]' \ + {-e,--pager-end}'[Jump to the end of the journal in the pager]' \ {-n,--lines=}'[Number of journal entries to show]:integer' \ '--no-tail[Show all lines, even in follow mode]' \ + {-r,--reverse}'[Reverse output]' \ {-o,--output=}'[Change journal output mode]:output modes:_outputmodes' \ - {-l,--full}'[Show long fields in full]' \ - {-a,--all}'[Show all fields, including long and unprintable]' \ + {-x,--catalog}'[Show explanatory texts with each log line]' \ {-q,--quiet}"[Don't show privilege warning]" \ - '--no-pager[Do not pipe output into a pager]' \ {-m,--merge}'[Show entries from all available journals]' \ + {-b,--boot=}'[Show data only from the specified boot or offset]:boot id or offset:_journal_boots' \ + {-k,--dmesg}'[Show only kernel messages, Implies -b]' \ + {-u,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \ + '--user-unit[Show data only from the specified user session unit]:units:_journal_fields _SYSTEMD_USER_UNIT' \ + {-p,--priority=}'[Show only messages within the specified priority range]:priority:_journal_fields PRIORITY' \ + {-c,--cursor=}'[Start showing entries from specified cursor]:cursors:_journal_fields __CURSORS' \ + '--after-cursor=[Start showing entries from the location in the journal after the cursor]:cursors:_journal_fields __CURSORS' \ + '--since=[Start showing entries newer or of the specified date]:YYYY-MM-DD HH\:MM\:SS' \ + '--until=[Stop showing entries older or of the specified date]:YYYY-MM-DD HH\:MM\:SS' \ + {-F,--field=}'[List all values a certain field takes]:Fields:_list_fields' \ + '--system[Show system and kernel messages]' \ + '--user[Show messages from user services]' \ {-D,--directory=}'[Show journal files from directory]:directories:_directories' \ - '--interval=[Time interval for changing the FSS sealing key]:time interval' \ - '--verify-key=[Specify FSS verification key]:FSS key' \ - {-h,--help}'[Show this help]' \ - '--version[Show package version]' \ + '--file=[Operate on specified journal files]:file:_files' \ + '--root=[Operate on catalog hierarchy under specified directory]:directories:_directories' \ '--new-id128[Generate a new 128 Bit ID]' \ '--header[Show journal header information]' \ '--disk-usage[Show total disk usage]' \ - {-F,--field=}'[List all values a certain field takes]:Fields:_list_fields' \ - '--setup-keys[Generate new FSS key pair]' \ - '--verify[Verify journal file consistency]' \ '--list-catalog[List messages in catalog]' \ + '--dump-catalog[Dump messages in catalog]' \ '--update-catalog[Update binary catalog database]' \ + '--setup-keys[Generate new FSS key pair]' \ + '--force[Force recreation of FSS keys]' \ + '--interval=[Time interval for changing the FSS sealing key]:time interval' \ + '--verify[Verify journal file consistency]' \ + '--verify-key=[Specify FSS verification key]:FSS key' \ '*::default: _journal_none' ;; localectl) @@ -652,6 +661,14 @@ _journal_fields() { _describe 'possible values' _fields } +_journal_boots() { + local -a _bootid _previousboots + _bootid=( ${(fao)"$(_call_program bootid "$service -F _BOOT_ID")"} ) + _previousboots=( -{1..${#_bootid}} ) + _alternative : \ + "offsets:boot offsets:(${_previousboots[@]})" \ + "bootid:boot ids:(${_bootid[@]})" +} _loginctl_all_sessions(){_sys_all_sessions=($(loginctl list-sessions | { while read a b; do echo " $a"; done; }) )} _loginctl_all_users() {_sys_all_users=( $(loginctl list-users | { while read a b; do echo " $a"; done; }) )} -- 1.8.3.4.1180.ge27c933 _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel