Filter option values instead of option names

This commit is contained in:
Rezart Qelibari
2022-04-27 09:37:16 +02:00
parent a9d7b8c04d
commit 32457fc4a4

View File

@@ -45,8 +45,8 @@ function generateModuleOptions() {
function filterPasswordOptions() {
local opt= hide=false
for opt in ${moduleOptions}; do
[[ $opt =~ ^--?.*password ]] && hide=true
[[ ${hide} = true ]] && { opt='******'; hide=false }
[[ $opt =~ ^--?.*password ]] && hide=true
filteredOptions+=($opt)
done
}