As a bonus you'd be able to lure the uninitiated into asking questions like "What's upvar?"
----- Original Message ----- From: "Greg Wooledge" <wool...@eeg.ccf.org> To:"bug-bash" <bug-bash@gnu.org> Cc: Sent:Mon, 19 Jun 2017 08:18:14 -0400 Subject:Re: RFE: Fix the name collision issues and typing issues with namerefs, improve various issues for function libraries On Mon, Jun 19, 2017 at 12:07:31AM -0400, George wrote: > ultimately identified in the nameref also comes from the caller) but the inconsistency there, of "typeset -n" behaving differently depending on where > the name comes from, is very unappealing to me. I'd much rather see this behavior activated by an explicit argument to declare, like this: > declare --caller-scope-nameref result_var=$whatever > Or this: > declare -n --scope=caller result_var=$whatever Or this: upvar "$1" myvar ~50% joking...