diff --git a/juci/config.cc b/juci/config.cc index 8d54a65..0e60ef4 100644 --- a/juci/config.cc +++ b/juci/config.cc @@ -31,11 +31,16 @@ void MainConfig::GenerateSource() { void MainConfig::GenerateTerminalCommands() { boost::property_tree::ptree source_json = cfg_.get_child("project"); - boost::property_tree::ptree commands_json = source_json.get_child("compile_commands"); - for (auto &i : commands_json) { - terminal_cfg_.InsertCompileCommand(i.second.get_value()); + boost::property_tree::ptree compile_commands_json = source_json.get_child("compile_commands"); + boost::property_tree::ptree run_commands_json = source_json.get_child("run_commands"); + for (auto &i : compile_commands_json) { + terminal_cfg_.InsertCompileCommand(i.second.get_value()); + } + for (auto &i : run_commands_json) { + terminal_cfg_.SetRunCommand(i.second.get_value()); } } + } void MainConfig::GenerateKeybindings() { DEBUG("Fetching keybindings"); diff --git a/juci/config.json b/juci/config.json index a9553f6..a9ac5d3 100644 --- a/juci/config.json +++ b/juci/config.json @@ -57,6 +57,9 @@ ] }, "project": { + "run_path": [ + ".build" + ], "compile_commands": [ "rm -rf ./.build", "mkdir build",