From baa21b02adbc4151c99c372d69c03903ec90a38b Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 20 Aug 2003 10:04:08 +0000 Subject: 18942: Fix / suffix handling in _perforce --- Completion/Unix/Command/_perforce | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_perforce') 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-'. 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 } -- cgit 1.4.1