-
-
Save zzamboni/ef89272e632f52f2d9fa668e48928151 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
[~/.elvish]─[⎇ master]─[✎ ]─> cat lib/test.elv | |
modvar = a | |
fn test [arg]{ | |
echo "echo arg=$arg" > /tmp/sourced0.elv | |
-source /tmp/sourced0.elv | |
fnvar = b | |
echo "echo fnvar=$fnvar" > /tmp/sourced1.elv | |
-source /tmp/sourced1.elv | |
echo "echo modvar=$modvar" > /tmp/sourced2.elv | |
-source /tmp/sourced2.elv | |
} | |
[~/.elvish]─[⎇ master]─[✎ ]─> use test | |
[~/.elvish]─[⎇ master]─[✎ ]─> test:test argval | |
arg=argval | |
fnvar=b | |
Exception: Compilation error: variable $modvar not found | |
/tmp/sourced2.elv, line 1: echo modvar=$modvar | |
Traceback: | |
/Users/taazadi1/.elvish/lib/test.elv, line 10: | |
-source /tmp/sourced2.elv | |
[tty], line 1: | |
test:test argval |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment