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

Felipe Sateler fsateler at debian.org
Wed Dec 7 13:28:45 GMT 2016


Hi ZSH Maintainers,

I'd like to ask for your help with the following issue.

As per the title, the journalctl completion function fails when
RC_QUOTES option is set (there is a double single-colon in one of the
completion lines). I asked Vincent to try if using emulate (as I saw
in other completions) worked. Yet it didn't.

On 6 December 2016 at 12:02, Vincent Lefevre <vincent at vinc17.net> wrote:
> On 2016-12-06 11:40:35 -0300, Felipe Sateler wrote:
>> I think the better fix is to somehow make zsh use default option
>> values when evaluating the completion functions. I see that some
>> completions use `emulate -LR zsh` (although both -L and -R are skipped
>> in some completions). Could you try if that fixes the issue for you?
>
> No, this has no effect. Even
>
> emulate -LR zsh
> unsetopt RC_QUOTES
>
> has no effect. I think that the problem comes from the fact that
> the '' is parsed at completion time.
>
> Actually, the "emulate -LR zsh" is even worse, as I get another
> message with it and my config:
>
> cventin:~> journalctl [TAB]
> (eval):1: no matches found: *:globbed-files
> cventin:~> journalctl
> zsh: do you wish to see all 255 possibilities (88 lines)?
>
> But I don't know the cause.

So the question is, is there a way to ensure a default mode of
operation during the completion function evaluation? With the number
of options zsh provides I find it unlikely that the completions are
compatible with setting/unsetting all possible combinations of them.
So if possible, I'd like to ensure the completions are run in a
consistent environment.

A short reproducer given by Vincent is:

zsf -f
% autoload -U compinit
% compinit
% setopt RC_QUOTES
% journalctl [TAB]
_arguments:comparguments:319: invalid argument: (--directory -D -M
--machine --root --file)'--root=[Operate on catalog hierarchy under
specified directory]:directories:_directories

-- 

Saludos,
Felipe Sateler




More information about the Pkg-systemd-maintainers mailing list