Variables: evalVariables goes threw the frames in the right order now (from the most local frame to the global one)
This commit is contained in:
parent
8c48eb9057
commit
3d7bf1029e
|
@ -192,7 +192,8 @@ proc readVariable(strm: Stream): string =
|
|||
# evalVariable finds a value of a variable
|
||||
proc evalVariable(vari: string): string =
|
||||
if vari == "$": return "$"
|
||||
for frame in shellVariables:
|
||||
for i in shellVariables.high..shellVariables.low:
|
||||
let frame = shellVariables[i]
|
||||
if frame.hasKey(vari): return frame[vari]
|
||||
if envVariables.hasKey(vari):
|
||||
result = envVariables[vari]
|
||||
|
|
Loading…
Reference in New Issue