Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: GNU diff completion problem
- X-seq: zsh-workers 10035
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>, "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: GNU diff completion problem
- Date: Thu, 9 Mar 2000 18:22:47 +0000
- In-reply-to: <000701bf89e6$d1b88f00$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <000701bf89e6$d1b88f00$21c9ca95@xxxxxxxxxxxxxx>
On Mar 9, 7:45pm, Andrej Borsenkow wrote:
} Subject: GNU diff completion problem
}
} I'm sorry, but I missed this discussion.
}
} Why _diff_options tests diff and not real command ($word[1])?
It's in case the real command is an alias or function that has unknown
side-effects.
} I have system default diff and GNU diff as gdiff. Current state does not
} allow me to complete GNU diff at all
You want
compdef _diff gdiff
zstyle ':completion:*:*:gdiff:*:version' command gdiff -v
There's still a bug in that the next time you use plain `diff' the saved
value of _diff_is_gnu will cause GNU diff options to be completed. The
value of "_is_gnu" should probably be saved on a per-command basis.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author