about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:07:54 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:07:54 +0000
commit8e3993667ab7b6dcf51d7a84d54d0f24547919bc (patch)
treec0712a737c0d9b3763f4b54751fd63985d5b01cd /Completion
parent0aa7811fb7c50d015eba37bd317f592b96415e08 (diff)
downloadzsh-8e3993667ab7b6dcf51d7a84d54d0f24547919bc.tar.gz
zsh-8e3993667ab7b6dcf51d7a84d54d0f24547919bc.tar.xz
zsh-8e3993667ab7b6dcf51d7a84d54d0f24547919bc.zip
moved to Completion/Base/Completer/_match
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/_match70
1 files changed, 0 insertions, 70 deletions
diff --git a/Completion/Core/_match b/Completion/Core/_match
deleted file mode 100644
index ce2b8affe..000000000
--- a/Completion/Core/_match
+++ /dev/null
@@ -1,70 +0,0 @@
-#autoload
-
-# This is intended to be used as a completer function after the normal
-# completer as in: `zstyle ":completion:::::" completer _complete _match'.
-# It temporarily switches on pattern matching, allowing you to try 
-# completion on patterns without having to setopt glob_complete.
-#
-# Note, however, that this is only really useful if you don't use the
-# expand-or-complete function because otherwise the pattern will
-# be expanded using globbing.
-
-### Shouldn't be needed any more: [[ _matcher_num -gt 1 ]] && return 1
-
-local tmp opm="$compstate[pattern_match]" ret=1 orig ins
-local oms="$_old_match_string"
-local ocsi="$compstate[insert]" ocspi="$compstate[pattern_insert]"
-
-# Do nothing if we don't have a pattern.
-
-tmp="${${:-$PREFIX$SUFFIX}#[~=]}"
-[[ "$tmp:q" = "$tmp" ]] && return 1
-
-_old_match_string="$PREFIX$SUFFIX$HISTNO"
-
-zstyle -s ":completion:${curcontext}:" match-original orig
-zstyle -s ":completion:${curcontext}:" insert-unambiguous ins
-
-# Try completion without inserting a `*'?
-
-if [[ -n "$orig" ]]; then
-  compstate[pattern_match]='-'
-  _complete && ret=0
-  compstate[pattern_match]="$opm"
-
-  # No completion with inserting `*'?
-
-  [[ ret -eq 1 && "$orig" = only ]] && return 1
-fi
-
-if (( ret )); then
-  compstate[pattern_match]='*'
-  _complete && ret=0
-  compstate[pattern_match]="$opm"
-fi
-
-if (( ! ret )); then
-
-  if [[ "$ins" = pattern && $compstate[nmatches] -gt 1 ]]; then
-
-    [[ "$oms" = "$PREFIX$SUFFIX$HISTNO" &&
-       "$compstate[insert]" = automenu-unambiguous ]] &&
-        compstate[insert]=automenu
-    [[ "$compstate[insert]" != *menu ]] &&
-        compstate[pattern_insert]= compstate[insert]=
-
-# We tried to be clever here, making completion insert unambiguous
-# expansions as early as possible, but this is really hard to test
-# and the code below probably does more harm than good.    
-#
-#    [[ $compstate[unambiguous_cursor] -gt $#compstate[unambiguous] ]] &&
-#        ins=yes compstate[insert]="$ocsi" compstate[pattern_insert]="$ocspi"
-  fi
-
-  [[ "$ins" = (true|yes|on|1) &&
-     $#compstate[unambiguous] -ge ${#:-${PREFIX}${SUFFIX}} ]] && 
-      compstate[pattern_insert]=unambiguous
-
-fi
-
-return ret