You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
441 B
30 lines
441 B
2 years ago
|
/*
|
||
|
* Copyright (C) 2023 Riyyi
|
||
|
*
|
||
|
* SPDX-License-Identifier: MIT
|
||
|
*/
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <string>
|
||
|
#include <string_view>
|
||
|
|
||
|
#include "ruc/singleton.h"
|
||
|
|
||
|
namespace blaze {
|
||
|
|
||
|
class Readline {
|
||
|
public:
|
||
|
Readline(bool pretty_print, std::string_view history_path);
|
||
|
virtual ~Readline() {}
|
||
|
|
||
|
bool get(std::string& output);
|
||
|
|
||
|
private:
|
||
|
bool m_pretty_print { false };
|
||
|
std::string m_prompt;
|
||
|
std::string_view m_history_path;
|
||
|
};
|
||
|
|
||
|
} // namespace blaze
|