X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=shell-completion%2Fzsh%2F_journalctl;h=73646b57f5e9eda5091d2770104fd5fdd56d0971;hp=61983d5b6d2b374be89bbb1621be0ddb861b7e2e;hb=9e15a18acd19bf80faef774ee92877024ef599a5;hpb=4af6e458e5a683b89032d560eb353c2272d3d564 diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl index 61983d5b6..73646b57f 100644 --- a/shell-completion/zsh/_journalctl +++ b/shell-completion/zsh/_journalctl @@ -13,19 +13,24 @@ _list_fields() { _{P,U,G}ID _COMM _EXE _CMDLINE _AUDIT_{SESSION,LOGINUID} _SYSTEMD_{CGROUP,SESSION,UNIT,OWNER_UID} - _SYSTEMD_USER_UNIT + _SYSTEMD_USER_UNIT USER_UNIT _SELINUX_CONTEXT _SOURCE_REALTIME_TIMESTAMP _{BOOT,MACHINE}_ID _HOSTNAME _TRANSPORT _KERNEL_{DEVICE,SUBSYSTEM} _UDEV_{SYSNAME,DEVNODE,DEVLINK} __CURSOR __{REALTIME,MONOTONIC}_TIMESTAMP) - _describe 'possible fields' journal_fields + case $_jrnl_none in + yes) _values -s '=' 'possible fields' \ + "${journal_fields[@]}:value:_journal_fields ${words[CURRENT]%%=*}" ;; + *) _describe 'possible fields' journal_fields ;; + esac } _journal_none() { - local -a _commands _files + local -a _commands _files _jrnl_none # Setting use-cache will slow this down considerably _commands=( ${"$(_call_program commands "$service" -F _EXE 2>/dev/null)"} ) + _jrnl_none='yes' _alternative : \ 'files:/dev files:_files -W /dev -P /dev/' \ "commands:commands:($_commands[@])" \ @@ -57,26 +62,26 @@ _arguments -s \ {-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' \ + {-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' \ + {-o+,--output=}'[Change journal output mode]:output modes:_outputmodes' \ {-x,--catalog}'[Show explanatory texts with each log line]' \ {-q,--quiet}"[Don't show privilege warning]" \ {-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' \ + {-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' \ + {-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 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' \ + {-D+,--directory=}'[Show journal files from directory]:directories:_directories' \ '--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]' \