zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] Remove curl completion
Date: Fri, 20 Nov 2015 03:18:46 +0000	[thread overview]
Message-ID: <20151120031658.GA3955@tarsus.local2> (raw)
In-Reply-To: <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:
 #


      reply	other threads:[~2015-11-20  3:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 23:16 Daniel Shahaf
2015-11-19  0:20 ` Bart Schaefer
2015-11-19 11:41   ` Vincent Lefevre
2015-11-20  3:18     ` Daniel Shahaf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151120031658.GA3955@tarsus.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).