chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
analyze: various cleanups
[elogind.git]
/
shell-completion
/
systemd-zsh-completion.zsh
diff --git
a/shell-completion/systemd-zsh-completion.zsh
b/shell-completion/systemd-zsh-completion.zsh
index 177a564d3837bb673bdf2308858af7c7f7b23760..77b26f6d26b27c1213eb69d7d3886a20023454f7 100644
(file)
--- a/
shell-completion/systemd-zsh-completion.zsh
+++ b/
shell-completion/systemd-zsh-completion.zsh
@@
-70,6
+70,7
@@
_ctls()
{-c,--cursor=}'[Start showing entries from specified cursor]:cursors:_journal_fields __CURSORS' \
{-b,--this-boot}'[Show data only from current boot]' \
{-u,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \
{-c,--cursor=}'[Start showing entries from specified cursor]:cursors:_journal_fields __CURSORS' \
{-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' \
{-f,--follow}'[Follow journal]' \
{-n,--lines=}'[Number of journal entries to show]:integer' \
{-p,--priority=}'[Show only messages within the specified priority range]:priority:_journal_fields PRIORITY' \
{-f,--follow}'[Follow journal]' \
{-n,--lines=}'[Number of journal entries to show]:integer' \
@@
-93,6
+94,7
@@
_ctls()
'--verify[Verify journal file consistency]' \
'--list-catalog[List messages in catalog]' \
'--update-catalog[Update binary catalog database]' \
'--verify[Verify journal file consistency]' \
'--list-catalog[List messages in catalog]' \
'--update-catalog[Update binary catalog database]' \
+ '*::default: _journal_none'
;;
localectl)
_arguments \
;;
localectl)
_arguments \
@@
-607,6
+609,7
@@
_list_fields() {
_{P,U,G}ID _COMM _EXE _CMDLINE
_AUDIT_{SESSION,LOGINUID}
_SYSTEMD_{CGROUP,SESSION,UNIT,OWNER_UID}
_{P,U,G}ID _COMM _EXE _CMDLINE
_AUDIT_{SESSION,LOGINUID}
_SYSTEMD_{CGROUP,SESSION,UNIT,OWNER_UID}
+ _SYSTEMD_USER_UNIT
_SELINUX_CONTEXT _SOURCE_REALTIME_TIMESTAMP
_{BOOT,MACHINE}_ID _HOSTNAME _TRANSPORT
_KERNEL_{DEVICE,SUBSYSTEM}
_SELINUX_CONTEXT _SOURCE_REALTIME_TIMESTAMP
_{BOOT,MACHINE}_ID _HOSTNAME _TRANSPORT
_KERNEL_{DEVICE,SUBSYSTEM}
@@
-615,6
+618,15
@@
_list_fields() {
_describe 'possible fields' journal_fields
}
_describe 'possible fields' journal_fields
}
+_journal_none() {
+ local -a _commands _files
+ _commands=( ${(f)"$(_call_program commands "$service" -F _EXE 2>/dev/null)"} )
+ _alternative : \
+ 'files:/dev files:_files -W /dev -P /dev/' \
+ "commands:commands:($_commands[@])" \
+ 'fields:fields:_list_fields'
+}
+
_journal_fields() {
local -a _fields cmd
cmd=("journalctl" "-F ${@[-1]}" "2>/dev/null" )
_journal_fields() {
local -a _fields cmd
cmd=("journalctl" "-F ${@[-1]}" "2>/dev/null" )