Bug#847203: systemd: journalctl zsh completion fails with RC_QUOTES

Vincent Lefevre vincent at vinc17.net
Tue Dec 6 14:13:09 GMT 2016


Package: systemd
Version: 232-7
Severity: minor
Tags: upstream patch

I've reported the following bug upstream:

  https://github.com/systemd/systemd/issues/4842

With the following commands after "zsh -f"

autoload -U compinit
compinit
setopt RC_QUOTES

the journalctl completion fails:

cventin% journalctl [TAB]
_arguments:comparguments:319: invalid argument: (--directory -D -M --machine --root --file)'--root=[Operate on catalog hierarchy under specified directory]:directories:_directories

This is probably due to the repeated single quote in:

    '(--directory -D -M --machine --root --file)''--root=[Operate on catalog hierarchy under specified directory]:directories:_directories' \

in "/usr/share/zsh/vendor-completions/_journalctl".

I suppose that the repeated single quote should be removed like in
the following line:

    '(--directory -D -M --machine --root)--file=[Operate on specified journal files]:file:_files' \

At least, this is equivalent without RC_QUOTES.
I've attached the corresponding patch.

-- Package-specific info:

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.0-2-amd64 (SMP w/12 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd depends on:
ii  adduser         3.115
ii  libacl1         2.2.52-3
ii  libapparmor1    2.10.95-7
ii  libaudit1       1:2.6.7-1
ii  libblkid1       2.29-1
ii  libc6           2.24-8
ii  libcap2         1:2.25-1
ii  libcryptsetup4  2:1.7.3-2
ii  libgcrypt20     1.7.3-2
ii  libgpg-error0   1.25-2
ii  libidn11        1.33-1
ii  libip4tc0       1.6.0+snapshot20161117-4
ii  libkmod2        23-1
ii  liblz4-1        0.0~r131-2
ii  liblzma5        5.2.2-1.2
ii  libmount1       2.29-1
ii  libpam0g        1.1.8-3.3
ii  libseccomp2     2.3.1-2.1
ii  libselinux1     2.6-3
ii  libsystemd0     232-7
ii  mount           2.29-1
ii  util-linux      2.29-1

Versions of packages systemd recommends:
ii  dbus            1.10.14-1
ii  libpam-systemd  232-7

Versions of packages systemd suggests:
ii  policykit-1        0.105-17
pn  systemd-container  <none>
pn  systemd-ui         <none>

Versions of packages systemd is related to:
pn  dracut           <none>
ii  initramfs-tools  0.125
ii  udev             232-7

-- Configuration Files:
/etc/systemd/journald.conf changed [not included]
/etc/systemd/system.conf changed [not included]

-- no debconf information
-------------- next part --------------
Index: systemd-232/shell-completion/zsh/_journalctl
===================================================================
--- systemd-232.orig/shell-completion/zsh/_journalctl
+++ systemd-232/shell-completion/zsh/_journalctl
@@ -107,7 +107,7 @@ _arguments -s \
     '--user[Show messages from user services]' \
     '(--directory -D -M --machine --root --file)'{-M+,--machine=}'[Operate on local container]:machines:_sd_machines' \
     '(--directory -D -M --machine --root --file)'{-D+,--directory=}'[Show journal files from directory]:directories:_directories' \
-    '(--directory -D -M --machine --root --file)''--root=[Operate on catalog hierarchy under specified directory]:directories:_directories' \
+    '(--directory -D -M --machine --root --file)--root=[Operate on catalog hierarchy under specified directory]:directories:_directories' \
     '(--directory -D -M --machine --root)--file=[Operate on specified journal files]:file:_files' \
     '--new-id128[Generate a new 128 Bit ID]' \
     '--header[Show journal header information]' \


More information about the Pkg-systemd-maintainers mailing list