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

Re: bug in _tar?



On Dec 6, 11:25am, Adam Spiers wrote:
} Subject: bug in _tar?

Almost certainly not a bug in _tar itself.

} The problem occurs when you have a word immediately after the cursor,
} i.e. with no space in between it and the cursor.

In this case zsh normally considers the stuff to the right of the cursor
to be part of the same word as what's to the left of the cursor.  Which
are you expecting: complete-in-word behavior or complete-prefix behavior?

(It sounds like you're expecting -prefix but getting -in-word.  Do you use
the _prefix completer?)

}   $ 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.

I suspect this is a problem with your matcher specifications or with use
of the _approximate completer.  Try using <C-x ?> instead of <TAB> and
look at the debugging trace.

The source of the problem is going to be that "emacs-" is a prefix of two
directories which might (probably even do) contain "lisp" subdirectories,
whereas "emacs-21.1." is a prefix only of the tar.gz file name of which
the "lisp/" suffix can't possibly be a part.  Consequently there are no
matches, but rather than beeping, something is executing `compadd -U',
causing the current word to be replaced by the empty completion.

Sven would be the best person to address this ...

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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