Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bug in _tar?



Hi everyone.

Adam Spiers wrote:
> 
> The problem occurs when you have a word immediately after the cursor,
> i.e. with no space in between it and the cursor.
> 
>   $ tar ztvf src/emacs-<TAB>lisp/
>   ---- archive file
>   emacs-21.1/             emacs-21.1.tar.gz       emacs-lisp-intro-1.05/
> 
> All good so far, but ...
> 
>   $ tar ztvf src/emacs-21.1.<TAB>lisp/
>   $ tar ztvf src
> 
> Suddenly everything vanishes.
> 
> This is with latest CVS.

Firstly, the problem is not _tar. It would have helped a lot if you
could have first checked whether the problem was specific to tar (which
it isn't) and then isolated what part of your setup was needed to
reproduce the problem because I struggled to reproduce it.

If anyone else is struggling to reproduce this, try:
    zsh -f
    autoload -U compinit; compinit
    setopt completeinword
    zstyle ':completion:*' completer _complete _prefix
    _c() { compadd -p tz/ -M 'r:|/=* r:|=*' emacs-21.1.tar.gz }
    compdef _c c
    c tz/em<tab>y

In the case of the original _tar example, the compadd comes from
_path_files:650. Seems like a bug somewhere in the C code to me but I
have little idea beyond that. Sven?

Oliver

_____________________________________________________________________
This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp



Messages sorted by: Reverse Date, Date, Thread, Author