1
0

s/space/spaces/g and spaces is now a list

This commit is contained in:
Deven Blake 2021-05-06 09:09:19 -04:00
parent eeffd70fe3
commit 8ec00ab832

View File

@ -30,15 +30,15 @@ def parsecommand(command):
for i in range(len(command)): for i in range(len(command)):
if (command[i] in quotes) and inQuotes == 0\ if (command[i] in quotes) and inQuotes == 0\
and (i == 0 \ and (i == 0 \
or (i > 0 and command[i-1] != escape)): or (i > 0 and not(command[i-1] in escapes))):
inQuotes = command[i] inQuotes = command[i]
elif command[i] == inQuotes \ elif command[i] == inQuotes \
and (i > 0 and command[i-1] != escape): and (i > 0 and not(command[i-1] in escapes)):
inQuotes = 0 inQuotes = 0
elif command[i] in space and inQuotes == 0\ elif command[i] in space and inQuotes == 0\
and (i > 0 and command[i-1] != escape): and (i > 0 and not(command[i-1] in escapes)):
parsed_command += [word] parsed_command += [word]
word = "" word = ""