Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Remove curl completion
- X-seq: zsh-workers 37163
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Remove curl completion
- Date: Fri, 20 Nov 2015 03:18:46 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=Sd4v/HvHbp7GkdIeaoV+0WKIssg=; b=fg73jL SfOwfrNKZlmC0gcEKh4eU5YTpsVRGiEKyZvGQ0GWXlEBw74aOa2378xkxeL7s7mg hbDJjaBvpc35lDwVF3sajaGfO+EAp2NDt1W8Pr+k49bc16d2l4KJWn8kvT3EoE01 sSI4n69rZ222bWYvUzpnXXgJSYmcaRh5XiWM8=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=Sd4v/HvHbp7GkdIeaoV+0WKIssg=; b=ecXz/ rBVY6WHWnkmwRlkt26iFerMdhhlXrm9kZxZ1DAbu5auLnTB0aVIYxC5clxbN1nSF tEn4gYp9lOjLOJLc56HE10CphpZg70ncG+RQZvLOGoU1NbYauGOHxNeQPdUBcWma kucLxo5fGlF+nXGyeL4OecvJTM3ybLfhK4fl74=
- In-reply-to: <20151119114106.GB20857@cventin.lip.ens-lyon.fr>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20151118231618.GI2070@tarsus.local2> <151118162052.ZM5511@torch.brasslantern.com> <20151119114106.GB20857@cventin.lip.ens-lyon.fr>
Vincent Lefevre wrote on Thu, Nov 19, 2015 at 12:41:06 +0100:
> On 2015-11-18 16:20:52 -0800, Bart Schaefer wrote:
> > On Nov 18, 11:16pm, Daniel Shahaf wrote:
> > } Upstream now ships a completion that is a superset of this one.
> >
> > I wish there were some way to conditionalize this. I dislike the
> > assumption that bleeding-edge curl and bleeding-edge zsh will always
> > be installed together. If I upgrade zsh but not curl, suddenly my
> > curl completion disappears entirely.
>
> Shouldn't the part concerning curl in
> $prefix/share/zsh/functions/Completion/Unix/_urls
> be moved to its own .../Completion/Unix/_curl, and curl install
> its completion in $prefix/share/zsh/vendor-completions so that
> it has the precedence?
+1. Will this suffice to implement Vincent's idea?
diff --git a/Completion/Unix/Command/_curl b/Completion/Unix/Command/_curl
new file mode 100644
index 0000000..72e2e5b
--- /dev/null
+++ b/Completion/Unix/Command/_curl
@@ -0,0 +1,7 @@
+#compdef curl
+
+# As of 7.43.0, curl upstream provides its own _curl definition. This
+# definition is provided as a fallback, and should be installed later
+# in $fpath than the curl-provided definition of _curl.
+
+_urls "$@"
diff --git a/Completion/Unix/Type/_urls b/Completion/Unix/Type/_urls
index 6f23803..e81eaac 100644
--- a/Completion/Unix/Type/_urls
+++ b/Completion/Unix/Type/_urls
@@ -1,4 +1,4 @@
-#compdef curl -value-,WWW_HOME,-default- -P -value-,(ftp|http(|s))_proxy,-default-
+#compdef -value-,WWW_HOME,-default- -P -value-,(ftp|http(|s))_proxy,-default-
# Configuration styles used:
#
Messages sorted by:
Reverse Date,
Date,
Thread,
Author