diff --git a/main.py b/main.py index 400fc0e..6199a28 100755 --- a/main.py +++ b/main.py @@ -27,6 +27,7 @@ import logging import os.path import pickle +import shlex import sys from recuperabit import logic, utils @@ -368,10 +369,12 @@ def main(): while True: print('\nWrite command ("help" for details):') try: - command = input('> ').split(' ') + command = shlex.split(input('> ').strip()) except (EOFError, KeyboardInterrupt): print('') exit(0) + if len(command) == 0: + continue cmd = command[0] arguments = command[1:] interpret(cmd, arguments, parts, shorthands, args.outputdir)