Commit 6cbeaf5d authored by Bram Schoenmakers's avatar Bram Schoenmakers

Merge pull request #24 from mruwek/prompt-enable-history

Enable history in prompt-mode
parents de1a805d e6ae21c1
......@@ -21,6 +21,7 @@ import sys
from topydo.cli.CLIApplicationBase import CLIApplicationBase, error
from topydo.cli.TopydoCompleter import TopydoCompleter
from prompt_toolkit.shortcuts import get_input
from prompt_toolkit.history import History
from topydo.lib.Config import config, ConfigError
......@@ -55,10 +56,11 @@ class PromptApplication(CLIApplicationBase):
self.todolist = TodoList.TodoList(self.todofile.read())
completer = TopydoCompleter(self.todolist)
history = History()
while True:
try:
user_input = get_input(u'topydo> ', completer=completer).split()
user_input = get_input(u'topydo> ', history=history, completer=completer).split()
except (EOFError, KeyboardInterrupt):
sys.exit(0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment