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())
|
||||
of ']', '}':
|
||||
stderr.write("Unexpected " & c & ".\n")
|
||||
of '$': result = "$"
|
||||
else:
|
||||
result.add(c)
|
||||
while not strm.atEnd():
|
||||
|
@ -189,6 +190,7 @@ proc readVariable(strm: Stream): string =
|
|||
|
||||
# evalVariable finds a value of a variable
|
||||
proc evalVariable(vari: string): string =
|
||||
if vari == "$": return "$"
|
||||
if shellVariables.hasKey(vari):
|
||||
result=shellVariables[vari]
|
||||
elif envVariables.hasKey(vari):
|
||||
|
|
Loading…
Reference in New Issue