Project

General

Profile

« Previous | Next » 

Revision 9090

lib/sh/util.sh: add get_prefix_vars()

View differences:

util.sh
260 260
# usage: local var=...; local_inv
261 261
alias local_inv='declare "no_$var=$(test "${!var}" || echo 1)"'
262 262

  
263
get_prefix_vars() { : "${prefix:?}"; eval echo '${!'$prefix'*}'; }
264

  
263 265
# usage: local prefix=..._; import_vars
264 266
alias import_vars="$(cat <<'EOF'
265 267
: "${prefix:?}"

Also available in: Unified diff