about summary refs log tree commit diff
path: root/Completion/Core/_approximate
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-10-26 15:36:10 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-10-26 15:36:10 +0000
commite0b26186f1d3c1a3a580eb7e8a8199c25536f4e6 (patch)
treee4247c2507fa1a135740a3cd02e7405cbdbfa69a /Completion/Core/_approximate
parent56f338eb8bfd4bcdbf14b495ff8a34425c3527d4 (diff)
downloadzsh-e0b26186f1d3c1a3a580eb7e8a8199c25536f4e6.tar.gz
zsh-e0b26186f1d3c1a3a580eb7e8a8199c25536f4e6.tar.xz
zsh-e0b26186f1d3c1a3a580eb7e8a8199c25536f4e6.zip
manual/8424
Diffstat (limited to 'Completion/Core/_approximate')
-rw-r--r--Completion/Core/_approximate25
1 files changed, 2 insertions, 23 deletions
diff --git a/Completion/Core/_approximate b/Completion/Core/_approximate
index 57b327e64..235e324f7 100644
--- a/Completion/Core/_approximate
+++ b/Completion/Core/_approximate
@@ -70,22 +70,6 @@ compadd() {
   fi
 }
 
-compgen() {
-  [[ "$*" != *-([a-zA-Z/]#|)U* &&
-     "${#:-$PREFIX$SUFFIX}" -le _comp_correct ]] && return
-
-  if [[ "$PREFIX" = \~*/* ]]; then
-    PREFIX="${PREFIX%%/*}/(#a${_comp_correct})${PREFIX#*/}"
-  else
-    PREFIX="(#a${_comp_correct})$PREFIX"
-  fi
-  if [[ -n "$_correct_prompt" ]]; then
-    builtin compgen "$@" -X "$_correct_prompt" -J _correct
-  else
-    builtin compgen "$@" -J _correct
-  fi
-}
-
 # Now initialise our counter. We also set `compstate[matcher]'
 # to `-1'. This allows completion functions to use the simple
 # `[[ compstate[matcher] -gt 1 ]] && return' to avoid being
@@ -99,11 +83,6 @@ compstate[matcher]=-1
 
 _correct_prompt="${cfgps//\\%e/1}"
 
-# We also need to set `extendedglob' and make the completion
-# code behave as if globcomplete were set.
-
-setopt extendedglob
-
 [[ -z "$compstate[pattern_match]" ]] && compstate[pattern_match]='*'
 
 while [[ _comp_correct -le comax ]]; do
@@ -135,7 +114,7 @@ while [[ _comp_correct -le comax ]]; do
       compstate[force_list]=list
     fi
     compstate[matcher]="$compstate[total_matchers]"
-    unfunction compadd compgen
+    unfunction compadd
 
     return 0
   fi
@@ -147,6 +126,6 @@ while [[ _comp_correct -le comax ]]; do
 done
 
 compstate[matcher]="$compstate[total_matchers]"
-unfunction compadd compgen
+unfunction compadd
 
 return 1