From 2f76a51352acacc7618f771dfbe2144fed9f4acd Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Tue, 4 Jan 2000 09:38:14 +0000 Subject: zsh-workers/9191 --- Completion/Core/_description | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Completion/Core/_description') diff --git a/Completion/Core/_description b/Completion/Core/_description index b1959d018..c6a7b8807 100644 --- a/Completion/Core/_description +++ b/Completion/Core/_description @@ -1,9 +1,10 @@ #autoload -local name gropt format gname hidden hide +local name gropt format gname hidden hide match gropt=(-J) hide=() +match=() if [[ "$1" = -([12]|)[VJ] ]]; then gropt=("$1") @@ -26,21 +27,23 @@ if [[ "$hidden" = (all|yes|true|1|on) ]]; then fi zstyle -s ":completion${curcontext}:$1" group-name gname && [[ -z "$gname" ]] && gname="$1" +zstyle -s ":completion${curcontext}:$1" matcher match && + match=(-M "${(q)match}") shift 2 [[ -n "$format" ]] && zformat -f format "$format" "d:$1" "${(@)argv[2,-1]}" if [[ -n "$gname" ]]; then if [[ -n "$format" ]]; then - eval "${name}=($hide $gropt ${(q)gname} -X \"${format}\")" + eval "${name}=($hide $match $gropt ${(q)gname} -X \"${format}\")" else - eval "${name}=($hide $gropt ${(q)gname})" + eval "${name}=($hide $match $gropt ${(q)gname})" fi else if [[ -n "$format" ]]; then - eval "${name}=($hide $gropt -default- -X \"${format}\")" + eval "${name}=($hide $match $gropt -default- -X \"${format}\")" else - eval "${name}=($hide $gropt -default-)" + eval "${name}=($hide $match $gropt -default-)" fi fi -- cgit 1.4.1