Compare commits

...
+4 -3
View File
@@ -3,6 +3,7 @@
from abc import ABC
from re import match
from shlex import split
from tfw.config.logs import logging
@@ -57,10 +58,10 @@ class TerminalCommands(ABC):
return match(self._command_method_regex, string)
def callback(self, history):
parts = history[-1].split()
parts = split(history[-1])
command = parts[0]
if command in self.command_implemetations.keys():
try:
self.command_implemetations[command](*parts[1:])
except IndexError:
LOG.debug('Command "%s" failed!', command)
except Exception: # pylint: disable=broad-except
LOG.exception('Command "%s" failed:', command)