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

Re: ignore-line style

> Oliver Kiddle wrote:
> > zstyle ':completion:*:*:(cat|diff|less|rm|vi):*' ignore-line true
> > 
> > So, filenames I've already mentioned are not offered for completion
> > with these commands. This is useful but there is a problem:
> > 
> > With diff, it is quite common to compare a file to another file with
> > the same name in a different directory but this style blocks completion
> > of the second file. e.g: diff file ../fi<tab>
> > It needs to include the `../' in the comparison against other words on
> > the line.

By the way, most modern diffs (GNU, solaris, etc.) allow you to do
	diff file ../
as a shortcut to
	diff file ../file

So you never actually need to complete that second file to the same basename...
I do agree it's a bit weird, though.

Nadav Har'El                        |      Monday, Oct 15 2001, 28 Tishri 5762
nyh@xxxxxxxxxxxxxxxxxxx             |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |A city is a large community where people
http://nadav.harel.org.il           |are lonesome together.

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