mirror of https://gitlab.com/ceda_ei/wish
Replace eval with variable indirection.
This commit is contained in:
parent
d9e86e4421
commit
2c6c83b826
10
wish.sh
10
wish.sh
|
@ -83,17 +83,17 @@ function wish_main() {
|
|||
if wish_${WISH_PLUGINS[$(($i + 1))]}_start $prev; then
|
||||
local plugin=${WISH_PLUGINS[$i]}
|
||||
local next_plugin=${WISH_PLUGINS[$(($i+1))]}
|
||||
local fg=$(eval echo \$WISH_$(echo $plugin |
|
||||
local fg_name=$(echo WISH_$(echo $plugin |
|
||||
tr '[:lower:]' '[:upper:]')_BG)
|
||||
local bg=$(eval echo \$WISH_$(echo $next_plugin |
|
||||
local bg_name=$(echo WISH_$(echo $next_plugin |
|
||||
tr '[:lower:]' '[:upper:]')_BG)
|
||||
wish_append $bg $fg
|
||||
wish_append ${!bg_name} ${!fg_name}
|
||||
fi
|
||||
else
|
||||
local plugin=${WISH_PLUGINS[$i]}
|
||||
local fg=$(eval echo \$WISH_$(echo $plugin |
|
||||
local fg_name=$(echo WISH_$(echo $plugin |
|
||||
tr '[:lower:]' '[:upper:]')_BG)
|
||||
wish_append -1 $fg
|
||||
wish_append -1 ${!fg_name}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue