From 2ab41d508d453be2305b898325a9a87f00aaebda Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 25 Nov 2015 01:46:55 +0000 Subject: 37215: _regex_words: Don't add mismatched parentheses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I ran into this in the wild¹, it manifested as the following error message: zregexparse:4: not enough regex arguments ¹ https://bug.tasktools.org/browse/TW-1729 --- Completion/Base/Utility/_regex_words | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Completion') diff --git a/Completion/Base/Utility/_regex_words b/Completion/Base/Utility/_regex_words index 77ba197a4..62c2491bb 100644 --- a/Completion/Base/Utility/_regex_words +++ b/Completion/Base/Utility/_regex_words @@ -20,7 +20,13 @@ local tag=$1 local desc=$2 shift 2 -reply=(\() +if (( $# )); then + reply=(\() +else + # ### Is this likely to happen in callers? Should we warn? + reply=() + return +fi integer i local -a wds -- cgit 1.4.1 From 06a24d37474b20ccd4ab2b8a255250ca99baa41b Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 20 Nov 2015 03:18:46 +0000 Subject: 37163: Remove curl completion --- ChangeLog | 3 +++ Completion/Unix/Command/_curl | 7 +++++++ Completion/Unix/Type/_urls | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 Completion/Unix/Command/_curl (limited to 'Completion') diff --git a/ChangeLog b/ChangeLog index 3fabfc5e3..d7e766e17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-11-27 Daniel Shahaf + * 37163: Completion/Unix/Command/_curl, + Completion/Unix/Type/_urls: Remove curl completion + * 37215: Completion/Base/Utility/_regex_words: _regex_words: Don't add mismatched parentheses diff --git a/Completion/Unix/Command/_curl b/Completion/Unix/Command/_curl new file mode 100644 index 000000000..72e2e5b53 --- /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 6f23803ed..e81eaac05 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: # -- cgit 1.4.1