From 8f6cfb83af3a6aac0203637f27ac407a1cf8d827 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 2 Apr 2001 11:08:45 +0000 Subject: moved to Completion/Base/Completer/_prefix --- Completion/Core/_prefix | 53 ------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 Completion/Core/_prefix (limited to 'Completion/Core/_prefix') diff --git a/Completion/Core/_prefix b/Completion/Core/_prefix deleted file mode 100644 index 86fad12dc..000000000 --- a/Completion/Core/_prefix +++ /dev/null @@ -1,53 +0,0 @@ -#autoload - -# Try to ignore the suffix. A bit like e-o-c-prefix. - -[[ _matcher_num -gt 1 || -z "$SUFFIX" ]] && return 1 - -local comp curcontext="$curcontext" tmp \ - _completer _completer_num \ - _matcher _c_matcher _matchers _matcher_num - -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='' - -_completer_num=1 - -for tmp in "$comp[@]"; do - if [[ "$tmp" = *:-* ]]; then - _completer="${${tmp%:*}[2,-1]//_/-}${tmp#*:}" - tmp="${tmp%:*}" - elif [[ $tmp = *:* ]]; then - _completer="${tmp#*:}" - tmp="${tmp%:*}" - else - _completer="${tmp[2,-1]//_/-}" - fi - curcontext="${curcontext/:[^:]#:/:${_completer}:}" - - zstyle -a ":completion:${curcontext}:" matcher-list _matchers || - _matchers=( '' ) - - _matcher_num=1 - _matcher='' - for _c_matcher in "$_matchers[@]"; do - if [[ "$_c_matcher" == +* ]]; then - _matcher="$_matcher $_c_matcher[2,-1]" - else - _matcher="$_c_matcher" - fi - - [[ "$tmp" != _prefix ]] && "$tmp" && return 0 - (( _matcher_num++ )) - done - (( _completer_num++ )) -done - -return 1 -- cgit 1.4.1