summaryrefslogtreecommitdiffstats
path: root/sinksh/repl/repl.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-05-27 10:12:29 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-05-27 10:12:29 +0200
commit314909776db599b2a90fecde6e85c9874768efeb (patch)
tree4e6c1f16be1271fba4b267bfbff4e6c8a31cbeed /sinksh/repl/repl.cpp
parent01002ca7602b8d8a569c6d7191a1ba1ad03f3e65 (diff)
downloadsink-314909776db599b2a90fecde6e85c9874768efeb.tar.gz
sink-314909776db599b2a90fecde6e85c9874768efeb.zip
A wrapper for linenoise
Because global variables in header files don't work if included from multiple places.
Diffstat (limited to 'sinksh/repl/repl.cpp')
-rw-r--r--sinksh/repl/repl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/sinksh/repl/repl.cpp b/sinksh/repl/repl.cpp
index 32932cb..c8f9b45 100644
--- a/sinksh/repl/repl.cpp
+++ b/sinksh/repl/repl.cpp
@@ -27,12 +27,12 @@
27 27
28#include "replStates.h" 28#include "replStates.h"
29#include "syntaxtree.h" 29#include "syntaxtree.h"
30#include "linenoise.hpp" 30#include "commandline.h"
31 31
32Repl::Repl(QObject *parent) 32Repl::Repl(QObject *parent)
33 : QStateMachine(parent) 33 : QStateMachine(parent)
34{ 34{
35 linenoise::LoadHistory(commandHistoryPath().toLocal8Bit()); 35 Commandline::loadHistory(commandHistoryPath());
36 36
37 // create all states 37 // create all states
38 ReadState *read = new ReadState(this); 38 ReadState *read = new ReadState(this);
@@ -61,7 +61,7 @@ Repl::Repl(QObject *parent)
61 61
62Repl::~Repl() 62Repl::~Repl()
63{ 63{
64 linenoise::SaveHistory(commandHistoryPath().toLocal8Bit()); 64 Commandline::saveHistory(commandHistoryPath());
65} 65}
66 66
67void Repl::printWelcomeBanner() 67void Repl::printWelcomeBanner()