1
0
mirror of https://gitlab.com/ceda_ei/wish synced 2025-10-31 10:00:04 +01:00

Replace tr with parameter expansion.

This commit is contained in:
2019-09-06 22:24:35 +05:30
parent 886ec3bfaf
commit 4bed328fa2
5 changed files with 11 additions and 14 deletions

View File

@@ -101,16 +101,13 @@ 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_name=$(echo WISH_$(echo $plugin |
tr '[:lower:]' '[:upper:]')_BG)
local bg_name=$(echo WISH_$(echo $next_plugin |
tr '[:lower:]' '[:upper:]')_BG)
local fg_name="WISH_${plugin^^}_BG"
local bg_name="WISH_${next_plugin^^}_BG"
wish_append ${!bg_name} ${!fg_name}
fi
else
local plugin=${WISH_PLUGINS[$i]}
local fg_name=$(echo WISH_$(echo $plugin |
tr '[:lower:]' '[:upper:]')_BG)
local fg_name="WISH_${plugin^^}_BG"
wish_append -1 ${!fg_name}
fi
fi