Variables: 2 dollarsignsin a row are equal to a single dollarsign now
This commit is contained in:
parent
0d8354ddd9
commit
eff52bf920
|
@ -179,6 +179,7 @@ proc readVariable(strm: Stream): string =
|
||||||
result.add(strm.readSubstitution())
|
result.add(strm.readSubstitution())
|
||||||
of ']', '}':
|
of ']', '}':
|
||||||
stderr.write("Unexpected " & c & ".\n")
|
stderr.write("Unexpected " & c & ".\n")
|
||||||
|
of '$': result = "$"
|
||||||
else:
|
else:
|
||||||
result.add(c)
|
result.add(c)
|
||||||
while not strm.atEnd():
|
while not strm.atEnd():
|
||||||
|
@ -189,6 +190,7 @@ proc readVariable(strm: Stream): string =
|
||||||
|
|
||||||
# evalVariable finds a value of a variable
|
# evalVariable finds a value of a variable
|
||||||
proc evalVariable(vari: string): string =
|
proc evalVariable(vari: string): string =
|
||||||
|
if vari == "$": return "$"
|
||||||
if shellVariables.hasKey(vari):
|
if shellVariables.hasKey(vari):
|
||||||
result=shellVariables[vari]
|
result=shellVariables[vari]
|
||||||
elif envVariables.hasKey(vari):
|
elif envVariables.hasKey(vari):
|
||||||
|
|
Loading…
Reference in New Issue