Feedback from dom96

This commit is contained in:
Ganesh Viswanathan 2018-05-25 10:14:13 -05:00
parent 6c416464f5
commit 95818069c9

View file

@ -42,22 +42,22 @@ proc outputReader(stream: Stream, missedEscape: var bool): string =
while true:
let c = stream.readStr(1)
if c.len() != 0:
case c[0]
of '\c', '\l':
result.add(c[0])
return
of '\27':
if result.len > 0:
missedEscape = true
return
handleEscape()
else:
result.add(c[0])
else:
if c.len() == 0:
return
case c[0]
of '\c', '\l':
result.add(c[0])
return
of '\27':
if result.len > 0:
missedEscape = true
return
handleEscape()
else:
result.add(c[0])
proc exec(args: varargs[string], exe=exePath,
yes=true, liveOutput=false,
global=false): tuple[output: string, exitCode: int] =