parseCommand: Spaces at the beginning of a command should no longer make the shell crash
This commit is contained in:
parent
9568721c82
commit
226c44c99c
|
@ -191,6 +191,7 @@ proc parseCommand(cmd: string): seq[string] =
|
|||
newitem.add(strm.readSubstitution.newStringStream.substitute)
|
||||
of '$': result.add(strm.readVariable.evalVariable)
|
||||
of ' ':
|
||||
if (result == @[]) and (newitem == ""): continue
|
||||
result.add(newitem)
|
||||
newitem = ""
|
||||
discard strm.skipSpaces()
|
||||
|
|
Loading…
Reference in New Issue