From bb93d135ba484cd423ae71b1686c63ac2c1c654f Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 6 Dec 1999 11:39:12 +0000 Subject: zsh-workers/8911 --- Completion/Core/_style | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Completion/Core/_style') diff --git a/Completion/Core/_style b/Completion/Core/_style index 6e2de23df..d666a9fd8 100644 --- a/Completion/Core/_style +++ b/Completion/Core/_style @@ -1,21 +1,21 @@ #autoload -local val ret +local _val _ret # Should we return the value? case "$1" in -b) - compstyles -S "$context" "$2" val - ret="$?" + compstyles -S "${curcontext}${2:+:${2}}" "$3" _val + _ret="$?" - if [[ "$val" = (#I)(yes|true|1|on) ]]; then - eval "${3}=yes" + if [[ "$_val" = (yes|true|1|on) ]]; then + eval "${4}=yes" else - eval "${3}=no" + eval "${4}=no" fi - return ret; + return _ret ;; -s) compstyles -S "${curcontext}${2:+:${2}}" "$3" "$4" @@ -33,11 +33,11 @@ esac [[ "$1" = -(|-) ]] && shift -if compstyles -S "${curcontext}${1:+:${1}}" "$2" val; then +if compstyles -S "${curcontext}${1:+:${1}}" "$2" _val; then if [[ $# -eq 3 ]]; then - [[ "$val" = ${~3} ]] + [[ "$_val" = ${~3} ]] else - [[ "$val" = (#I)(yes|true|1|on) ]] + [[ "$_val" = (yes|true|1|on) ]] fi else return 1 -- cgit 1.4.1