From 188e6569dbb250b25bf3fe74b9d13007d5207b51 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Fri, 10 Dec 1999 14:47:55 +0000 Subject: manual/8992 --- Completion/Core/_expand | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Completion/Core/_expand') 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}" ) -- cgit 1.4.1