Last active
August 8, 2019 16:15
-
-
Save NightMachinery/32689e786a3b7f5865a042d49b884b57 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(( $+functions[dvar] )) || function dvar() { | |
local pre='' | |
test -z "$2" || pre="CODE $2 | " | |
echo "$pre$(typeset -p "$1" 2>&1)" | |
echo "$pre$1 in env: $(printenv "$1")" | |
} | |
localesc() { | |
echo Innocence | |
} | |
tlocalesc() { | |
dvar music_dir t0 | |
local music_dir=outside1 | |
dvar music_dir t1 | |
# localesc | |
music_dir=hi localesc | |
dvar music_dir t2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Somehow
music_dir
gets unset after callingtlocalesc
.