1 |
## oils_failures_allowed: 2
|
2 |
|
3 |
|
4 |
shopt -s ysh:upgrade
|
5 |
|
6 |
pp test_ (type(ENV))
|
7 |
|
8 |
sh=$[ENV.SH]
|
9 |
env -i PATH=$[ENV.PATH] ZZ=zz $sh -c 'echo "ZZ is $[ENV.ZZ]"'
|
10 |
|
11 |
## STDOUT:
|
12 |
(Str) "Dict"
|
13 |
ZZ is zz
|
14 |
## END
|
15 |
|
16 |
|
17 |
shopt -s ysh:upgrade
|
18 |
|
19 |
_A=a _B=b env | grep '^_' | sort
|
20 |
|
21 |
## STDOUT:
|
22 |
_A=a
|
23 |
_B=b
|
24 |
## END
|
25 |
|
26 |
|
27 |
shopt -s ysh:upgrade
|
28 |
|
29 |
setglobal ENV.PYTHONPATH = 'foo'
|
30 |
|
31 |
pp test_ (ENV)
|
32 |
|
33 |
#export PYTHONPATH=zz
|
34 |
|
35 |
# execute POSIX shell
|
36 |
sh -c 'echo pythonpath=$PYTHONPATH'
|
37 |
|
38 |
## STDOUT:
|
39 |
## END
|
40 |
|
41 |
|
42 |
shopt -s ysh:upgrade
|
43 |
|
44 |
export PYTHONPATH='foo'
|
45 |
|
46 |
#pp test_ (ENV)
|
47 |
|
48 |
# execute POSIX shell
|
49 |
sh -c 'echo pythonpath=$PYTHONPATH'
|
50 |
|
51 |
## STDOUT:
|
52 |
pythonpath=foo
|
53 |
## END
|
54 |
|