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

Re: PATCH: _diff



Oliver Kiddle wrote:

> This may have already been fixed but the diff completion seemed to call
> diff with /dev/null as stdin but not stdout and stderr. This causes me
> to get an error messages about -v not being an option in the middle of
> my command line. I take it that redirecting stdin was a typo?
> 
> I seem to remember a recent discussion which I didn't follow fully about
> how to call programs from completion functions and a proposed
> configurable function for doing it so I haven't patched the use of
> 'command diff'. I leave the original diff and link GNU diff to 'gdiff'.
> With the current _diff, I can't then get GNU style completion for gdiff.
> Having both the GNU and supplied utilites are fairly common place on
> commercial UNIX installations. For this reason, I object to using
> non-local variables like _diff_is_gnu and calling 'diff' instead of
> pulling out the first word on the command-line.

Well, if we use something like _diff_is_gnu[$words[1]], using a
non-local variable should be fine, right?

But you are right -- I had forgotten to integrate using $words[1] into 
my suggestion somehow. Hm.

Still no patch for any of this, though. The problem is that this would
probably be interesting in several places so that updating the docs
would be quite a bit of work. And since we also had the `discussion'
about trying to add some auto-documentation mechanism (using magic
comments in the functions) I wanted to delay it until we had thought
about that some more.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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