about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2003-08-20 10:04:08 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2003-08-20 10:04:08 +0000
commitbaa21b02adbc4151c99c372d69c03903ec90a38b (patch)
tree7f218896caf3cb7a28fc83c132b8d79ee8ee93ff
parent6d8b974765b25542495af0459c6f2832096741c5 (diff)
downloadzsh-baa21b02adbc4151c99c372d69c03903ec90a38b.tar.gz
zsh-baa21b02adbc4151c99c372d69c03903ec90a38b.tar.xz
zsh-baa21b02adbc4151c99c372d69c03903ec90a38b.zip
18942: Fix / suffix handling in _perforce
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_perforce7
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4a6a110ed..571ea515e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-20  Peter Stephenson  <pws@csr.com>
+
+	* 18942: Completion/Unix/Command/_perforce: Fix autoremoval
+	of slashes which were stomped on by the special suffix handler.
+
 2003-08-20  Oliver Kiddle  <opk@zsh.org>
 
 	* 18947: Completion/Unix/Command/_chown: also complete options using
diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce
index 71dcb44ec..cde4cf013 100644
--- a/Completion/Unix/Command/_perforce
+++ b/Completion/Unix/Command/_perforce
@@ -179,7 +179,7 @@
 #
 # Much of the information from Perforce is provided by calls to p4
 # commands.  This is done via the _call_program interface, as described
-# in the zshcompletesys manual page.  Hence a suitable context with the
+# in the zshcompsys manual page.  Hence a suitable context with the
 # `command' style allows the user to take control of this call.
 # The tags used are the name of the p4 command, or in the case of
 # calls to help subcommands, `help-<subcommand>'.  Note that if the
@@ -540,6 +540,11 @@ _perforce_file_suffix() {
 	     # Normal suffix removal
 	     LBUFFER="$LBUFFER[1,-2]"
 	 fi
+    elif [[ $LBUFFER[-1] = / ]]; then
+	# Normal suffix removal for directories.
+	if [[ $KEYS = (*[^[:print:]]*|[[:blank:]\;\&\|/]) ]]; then
+	    LBUFFER="$LBUFFER[1,-2]"
+	fi
     fi
 }