zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Remove curl completion
@ 2015-11-18 23:16 Daniel Shahaf
  2015-11-19  0:20 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Shahaf @ 2015-11-18 23:16 UTC (permalink / raw)
  To: zsh-workers

Upstream now ships a completion¹ that is a superset of this one.

Daniel

¹ https://github.com/bagder/curl/blob/master/scripts/zsh.pl

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:
 #


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove curl completion
  2015-11-18 23:16 [PATCH] Remove curl completion Daniel Shahaf
@ 2015-11-19  0:20 ` Bart Schaefer
  2015-11-19 11:41   ` Vincent Lefevre
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2015-11-19  0:20 UTC (permalink / raw)
  To: zsh-workers

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove curl completion
  2015-11-19  0:20 ` Bart Schaefer
@ 2015-11-19 11:41   ` Vincent Lefevre
  2015-11-20  3:18     ` Daniel Shahaf
  0 siblings, 1 reply; 4+ messages in thread
From: Vincent Lefevre @ 2015-11-19 11:41 UTC (permalink / raw)
  To: zsh-workers

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?

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove curl completion
  2015-11-19 11:41   ` Vincent Lefevre
@ 2015-11-20  3:18     ` Daniel Shahaf
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Shahaf @ 2015-11-20  3:18 UTC (permalink / raw)
  To: zsh-workers

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:
 #


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-11-20  3:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-18 23:16 [PATCH] Remove curl completion Daniel Shahaf
2015-11-19  0:20 ` Bart Schaefer
2015-11-19 11:41   ` Vincent Lefevre
2015-11-20  3:18     ` Daniel Shahaf

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).