aboutsummaryrefslogtreecommitdiffstats
path: root/shells
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2008-11-17 19:21:24 +0800
committerdes <des@FreeBSD.org>2008-11-17 19:21:24 +0800
commit12472ad2cb96b323f3e326713abc18da291faf12 (patch)
treef3cfbbc72ac8176f5a3cfe468afc1d0a1443a992 /shells
parent26c1c37a0977d6ffb0babd5f53b72ed1c758fd57 (diff)
downloadfreebsd-ports-graphics-12472ad2cb96b323f3e326713abc18da291faf12.tar.gz
freebsd-ports-graphics-12472ad2cb96b323f3e326713abc18da291faf12.tar.zst
freebsd-ports-graphics-12472ad2cb96b323f3e326713abc18da291faf12.zip
Upstream patch to support unusual --help syntax used by fetchmail.
Submitted by: Baptiste Daroussin <baptiste.daroussin@gmail.com>
Diffstat (limited to 'shells')
-rw-r--r--shells/zsh/Makefile2
-rw-r--r--shells/zsh/files/patch-Completion-Base-Utility-_arguments34
2 files changed, 35 insertions, 1 deletions
diff --git a/shells/zsh/Makefile b/shells/zsh/Makefile
index 2128165ebe4..6ad3c9011b7 100644
--- a/shells/zsh/Makefile
+++ b/shells/zsh/Makefile
@@ -7,7 +7,7 @@
PORTNAME= zsh
PORTVERSION= 4.3.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= shells
MASTER_SITES= SF
.if !defined(NOPORTDOCS)
diff --git a/shells/zsh/files/patch-Completion-Base-Utility-_arguments b/shells/zsh/files/patch-Completion-Base-Utility-_arguments
new file mode 100644
index 00000000000..8a3dcc7ab98
--- /dev/null
+++ b/shells/zsh/files/patch-Completion-Base-Utility-_arguments
@@ -0,0 +1,34 @@
+--- Completion/Base/Utility/_arguments.orig 2007-12-14 12:57:55.000000000 +0100
++++ Completion/Base/Utility/_arguments 2008-11-17 12:14:23.806795295 +0100
+@@ -5,7 +5,7 @@
+
+ local long cmd="$words[1]" descr odescr mesg subopts opt opt2 usecc autod
+ local oldcontext="$curcontext" hasopts rawret optarg singopt alwopt
+-local setnormarg
++local setnormarg start rest
+ local -a match mbegin mend
+
+ long=$argv[(I)--]
+@@ -97,10 +97,19 @@
+ # present. Maybe the problem was that the intervening code
+ # didn't. If it's buggy without removing them, the problem
+ # probably is later, not here.
+- if [[ -z ${tmp[(r)${match[1]%%[^a-zA-Z0-9_-]#}]} ]]; then
+- tmp+=($match[1])
++ start=${match[1]}
++ rest=${match[2]}
++ if [[ -z ${tmp[(r)${start%%[^a-zA-Z0-9_-]#}]} ]]; then
++ # variant syntax seen in fetchmail:
++ # --[fetch]all means --fetchall or --all.
++ # maybe needs to be more general
++ if [[ $start = (#b)(*)\[(*)\](*) ]]; then
++ tmp+=("${match[1]}${match[2]}${match[3]}" "${match[1]}${match[3]}")
++ else
++ tmp+=($start)
++ fi
+ fi
+- opt=$match[2]
++ opt=$rest
+ done
+ # If there's left over text, assume it's a description; it
+ # may be truncated but if it's too long it's no use anyway.