From 626e2aeb1657f112feb6d03c34bb9e9f44764c75 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 23 Mar 2000 04:19:26 +0000 Subject: zsh-workers/10195 --- Completion/Core/_setup | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) (limited to 'Completion/Core/_setup') diff --git a/Completion/Core/_setup b/Completion/Core/_setup index 5d63b97ce..0b9e5d0a9 100644 --- a/Completion/Core/_setup +++ b/Completion/Core/_setup @@ -18,42 +18,34 @@ if zstyle -a ":completion:${curcontext}:$1" list-colors val; then fi -if zstyle -s ":completion:${curcontext}:$1" list-packed val; then - if [[ "$val" = (yes|true|1|on) ]]; then - compstate[list]="${compstate[list]} packed" - else - compstate[list]="${compstate[list]:gs/packed//}" - fi +if zstyle -t ":completion:${curcontext}:$1" list-packed; then + compstate[list]="${compstate[list]} packed" +elif [[ $? -eq 1 ]]; then + compstate[list]="${compstate[list]:gs/packed//}" else compstate[list]="$_saved_list" fi -if zstyle -s ":completion:${curcontext}:$1" list-rows-first val; then - if [[ "$val" = (yes|true|1|on) ]]; then - compstate[list]="${compstate[list]} rows" - else - compstate[list]="${compstate[list]:gs/rows//}" - fi +if zstyle -t ":completion:${curcontext}:$1" list-rows-first; then + compstate[list]="${compstate[list]} rows" +elif [[ $? -eq 1 ]]; then + compstate[list]="${compstate[list]:gs/rows//}" else compstate[list]="$_saved_list" fi -if zstyle -s ":completion:${curcontext}:$1" last-prompt val; then - if [[ "$val" = (yes|true|1|on) ]]; then - compstate[last_prompt]=yes - else - compstate[last_prompt]='' - fi +if zstyle -t ":completion:${curcontext}:$1" last-prompt; then + compstate[last_prompt]=yes +elif [[ $? -eq 1 ]]; then + compstate[last_prompt]='' else compstate[last_prompt]="$_saved_lastprompt" fi -if zstyle -s ":completion:${curcontext}:$1" accept-exact val; then - if [[ "$val" = (yes|true|1|on) ]]; then - compstate[exact]=accept - else - compstate[exact]='' - fi +if zstyle -t ":completion:${curcontext}:$1" accept-exact; then + compstate[exact]=accept +elif [[ $? -eq 1 ]]; then + compstate[exact]='' else compstate[exact]="$_saved_exact" fi -- cgit 1.4.1