about summary refs log tree commit diff
path: root/Completion/Core/_expand
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-12-10 14:47:55 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-12-10 14:47:55 +0000
commit188e6569dbb250b25bf3fe74b9d13007d5207b51 (patch)
treebbc3c0b5f636f5887aa5cf52c8b0a75b4cccf353 /Completion/Core/_expand
parentd5d015115cda8eed53b668ee325f12b2dd863383 (diff)
downloadzsh-188e6569dbb250b25bf3fe74b9d13007d5207b51.tar.gz
zsh-188e6569dbb250b25bf3fe74b9d13007d5207b51.tar.xz
zsh-188e6569dbb250b25bf3fe74b9d13007d5207b51.zip
manual/8992
Diffstat (limited to 'Completion/Core/_expand')
-rw-r--r--Completion/Core/_expand11
1 files changed, 7 insertions, 4 deletions
diff --git a/Completion/Core/_expand b/Completion/Core/_expand
index bde5ee2f8..cdfc2a8d1 100644
--- a/Completion/Core/_expand
+++ b/Completion/Core/_expand
@@ -13,7 +13,8 @@ local exp word="$PREFIX$SUFFIX" sort expr expl curcontext="${curcontext}"
 
 # First, see if we should insert all *completions*.
 
-if _style -s '' completions expr && [[ "${(e):-\$[$expr]}" -eq 1 ]]; then
+if zstyle -s ":completion${curcontext}:" completions expr &&
+   [[ "${(e):-\$[$expr]}" -eq 1 ]]; then
   compstate[insert]=all
   return 1
 fi
@@ -29,7 +30,8 @@ exp=("$word")
 # First try substitution. That weird thing spanning multiple lines
 # changes quoted spaces, tabs, and newlines into spaces.
 
-_style -s '' substitute expr && [[ "${(e):-\$[$expr]}" -eq 1 ]] &&
+zstyle -s ":completion${curcontext}:" substitute expr &&
+    [[ "${(e):-\$[$expr]}" -eq 1 ]] &&
     exp=( "${(e)exp//\\[ 	
 ]/ }" )
 
@@ -39,7 +41,8 @@ _style -s '' substitute expr && [[ "${(e):-\$[$expr]}" -eq 1 ]] &&
 
 # Now try globbing.
 
-_style -s '' glob expr && [[ "${(e):-\$[$expr]}" -eq 1 ]] &&
+zstyle -s ":completion${curcontext}:" glob expr &&
+    [[ "${(e):-\$[$expr]}" -eq 1 ]] &&
     exp=( ${~exp}(N) )
 
 # If we don't have any expansions or only one and that is the same
@@ -50,7 +53,7 @@ _style -s '' glob expr && [[ "${(e):-\$[$expr]}" -eq 1 ]] &&
 
 # Now add as matches whatever the user requested.
 
-_style -s '' sort sort
+zstyle -s ":completion${curcontext}:" sort sort
 
 [[ "$sort" = (yes|true|1|on) ]] && exp=( "${(@o)exp}" )