[Pkg-zsh-devel] Bug#780531: zsh: tail -F does not complete file names

Frank Terbeck ft at bewatermyfriend.org
Tue Mar 17 21:48:24 UTC 2015


Hello Sebastian,

Sebastian Ramacher wrote:
[...]
> The completion for "tail -f " correctly completes files, but it does not for
> "tail -F ". "tail -F <tab>" displays "completing -f" and and nothing else. I'd
> also expect to get "completing files" there.

Zsh does not supply a completion function for tail. Thus, it should fall
back to file-completion for programs it doesn't know for any better.

You can try this:

    % zsh -f
    % autoload -Uz compinit; compinit
    % tail -F <tab>

and try to reproduce the issue with a clean zsh instance with just the
completion system loaded. You'll see that you can't; because I can't.

My guess is, that you've got a completion handler configured for tail.

Like ‘_gnu_generic’. Try this (from a failing shell of yours):

    % print ${_comps[tail]}

and that will most likely print ‘_gnu_generic’.


Long story short: This is not a bug in Debian's zsh package. But rather
in your configuration, since it assumes _gnu_generic can handle the
--help output of current GNU tail versions. Which it apparently can't.

You could argue, that this might be considered a bug in zsh's
_gnu_generic function; but really, that's a hack to try and parse
completion information from --help of any given command you assign to
it. If that output changes in an incompatible way, the function is
screwed. It's a best-guess solution rather than something sustainable.

I would suggest dropping the completion function assignment from your
configuration.


Regards, Frank



More information about the Pkg-zsh-devel mailing list