impr: Make --pl subcommand automatically register ImHex's include dirs

This commit is contained in:
WerWolv
2023-09-03 12:25:00 +02:00
parent 632ca944de
commit 632f388ece
2 changed files with 5 additions and 1 deletions

View File

@@ -263,6 +263,10 @@ namespace hex::plugin::builtin {
std::vector<std::string> processedArgs = args;
if (processedArgs.empty())
processedArgs.emplace_back("--help");
else {
for (const auto &path : fs::getDefaultPaths(fs::ImHexPath::PatternsInclude))
processedArgs.emplace_back(hex::format("--includes={}", wolv::util::toUTF8String(path)));
}
std::exit(pl::cli::executeCommandLineInterface(processedArgs));
}