mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-16 12:21:18 +02:00
18942: Fix / suffix handling in _perforce
This commit is contained in:
parent
6d8b974765
commit
baa21b02ad
2 changed files with 11 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue