mirror of
https://github.com/open-goal/jak-project
synced 2026-06-09 20:50:55 -04:00
a0a85eb60a
- You can define a `startup.gc` in your user folder, each line will be executed on startup (deprecates the usefulness of some cli flags) - You can define a `repl-config.json` file to override REPL settings. Long-term this is a better approach than a bunch of CLI flags as well - Via this, you can override the amount of time the repl will attempt to listen for the target - At the same time, I think i may have found why on Windows it can sometimes take forever to timeout when the game dies, will dig into this later - Added some keybinds for common operations, shown here https://user-images.githubusercontent.com/13153231/202890278-1ff2bb06-dddf-4bde-9178-aa0883799167.mp4 > builds the game, connects to it, attaches a debugger and continues, launches it, gets the backtrace, stops the target -- all with only keybinds. If you want these keybinds to work inside VSCode's integrated terminal, you need to add the following to your settings file ```json "terminal.integrated.commandsToSkipShell": [ "-workbench.action.quickOpen", "-workbench.action.quickOpenView" ] ```
38 lines
950 B
C++
38 lines
950 B
C++
#pragma once
|
|
|
|
#include <functional>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "third-party/replxx/include/replxx.hxx"
|
|
|
|
using Replxx = replxx::Replxx;
|
|
|
|
class ReplWrapper {
|
|
Replxx repl;
|
|
|
|
public:
|
|
ReplWrapper() {}
|
|
Replxx& get_repl() { return repl; }
|
|
void init_default_settings();
|
|
|
|
// Functionality / Commands
|
|
void clear_screen();
|
|
void print_to_repl(const std::string_view& str);
|
|
void print_welcome_message();
|
|
void set_history_max_size(size_t len);
|
|
const char* readline(const std::string& prompt);
|
|
void add_to_history(const std::string& line);
|
|
void save_history();
|
|
void load_history();
|
|
void print_help_message();
|
|
std::pair<std::string, bool> get_current_repl_token(std::string const& context);
|
|
|
|
std::vector<std::string> examples{};
|
|
using cl = Replxx::Color;
|
|
std::vector<std::pair<std::string, cl>> regex_colors{};
|
|
|
|
private:
|
|
replxx::Replxx::key_press_handler_t commit_text_action(std::string text_to_commit);
|
|
};
|