Project

General

Profile

« Previous | Next » 

Revision 10646

lib/sh/util.sh: local_inv: also echo_vars the new var

View differences:

lib/sh/util.sh
67 67
set_inv() { set_var no_"$1" "$(test "${!1}" || echo 1)"; }
68 68

  
69 69
# usage: local var=...; local_inv
70
alias local_inv='declare "no_$var=$(test "${!var}" || echo 1)"'
70
alias local_inv=\
71
'declare "no_$var=$(test "${!var}" || echo 1)"; echo_vars no_$var'
71 72

  
72 73
unexport() { export -n "$@"; }
73 74
	# `declare +x` won't work because it defines the var if it isn't set

Also available in: Unified diff