mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-20 05:53:52 +01:00
24 lines
441 B
Plaintext
24 lines
441 B
Plaintext
#autoload
|
|
|
|
# Try to ignore the suffix. A bit like e-o-c-prefix.
|
|
|
|
[[ -n "$SUFFIX" ]] || return 1
|
|
|
|
local comp i
|
|
|
|
zstyle -a ":completion:${curcontext}:" completer comp ||
|
|
comp=( "${(@)_completers[1,_completer_num-1][(R)_prefix(|:*),-1]}" )
|
|
|
|
if zstyle -t ":completion:${curcontext}:" add-space; then
|
|
ISUFFIX=" $SUFFIX"
|
|
else
|
|
ISUFFIX="$SUFFIX"
|
|
fi
|
|
SUFFIX=''
|
|
|
|
for i in "$comp[@]"; do
|
|
[[ "$i" != _prefix ]] && "$i" && return 0
|
|
done
|
|
|
|
return 1
|