diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-03-23 04:19:26 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-03-23 04:19:26 +0000 |
commit | 626e2aeb1657f112feb6d03c34bb9e9f44764c75 (patch) | |
tree | 9e4a306df7b5826a796b99f0b6ffa3423ee9f5f9 /Completion/Core/_setup | |
parent | 766fcd5ee2ef632cd982a1ec118dbdfde17c03a8 (diff) | |
download | zsh-626e2aeb1657f112feb6d03c34bb9e9f44764c75.tar.gz zsh-626e2aeb1657f112feb6d03c34bb9e9f44764c75.tar.xz zsh-626e2aeb1657f112feb6d03c34bb9e9f44764c75.zip |
zsh-workers/10195
Diffstat (limited to 'Completion/Core/_setup')
-rw-r--r-- | Completion/Core/_setup | 40 |
1 files changed, 16 insertions, 24 deletions
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 |