[systemd-devel] [PATCH 18/18] shell-comp: Fix up unit completing for _journalctl

William Giokas 1007380 at gmail.com
Thu Aug 1 19:35:17 PDT 2013


-u and --user-unit can be specified multiple times, so put a * in front
of it, and --user-unit can have an =, and should be looking for the
USER_UNIT not _SYSTEMD_USER_UNIT.
---
 shell-completion/zsh/_journalctl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/shell-completion/zsh/_journalctl b/shell-completion/zsh/_journalctl
index 61983d5..76cb594 100644
--- a/shell-completion/zsh/_journalctl
+++ b/shell-completion/zsh/_journalctl
@@ -66,8 +66,8 @@ _arguments -s \
     {-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' \
+    \*{-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' \
-- 
1.8.4.rc0.352.g531e8cb



More information about the systemd-devel mailing list