about summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2012-08-14 09:04:55 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2012-08-14 09:04:55 +0000
commit787df278549b8e2a970fe3a2a4cc08e20ff65188 (patch)
tree987d01b87f76f96e32475ddd49891750af9398fd /Completion/Unix
parent5fdc9c9f8fa0c42a0e22c61261dd6af17a24701f (diff)
downloadzsh-787df278549b8e2a970fe3a2a4cc08e20ff65188.tar.gz
zsh-787df278549b8e2a970fe3a2a4cc08e20ff65188.tar.xz
zsh-787df278549b8e2a970fe3a2a4cc08e20ff65188.zip
ChangeLog-5.0 should be ChangeLog-4.3, Bart says
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_perforce11
1 files changed, 10 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce
index 2c1365a79..78f6cd71e 100644
--- a/Completion/Unix/Command/_perforce
+++ b/Completion/Unix/Command/_perforce
@@ -474,8 +474,17 @@ _perforce_gen_cmd_list() {
   # Ignore blank lines and the heading line beginning `Perforce...'
   # Just gets run once, then cached, so don't bother optimising
   # this to a grossly unreadable parameter substitution.
+  _perforce_cmd_list=()
   _perforce_call_p4 help-commands help commands | while read -A hline; do
-    (( ${#hline} < 2 )) && continue
+    if (( ${#hline} < 2 )); then
+      if (( ${#_perforce_cmd_list} )); then
+	# Ignore comments after the main list of commands, separate by blank
+	# line.
+	break
+      else
+	continue
+      fi
+    fi
     [[ $hline[1] = (#i)perforce ]] && continue
     _perforce_cmd_list+=("${hline[1]}:${hline[2,-1]}")
   done