From 7ebccd2dea54867ed2e4c89739a1856af6b85fe3 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Mon, 21 Jul 2025 10:35:58 +1200 Subject: [PATCH] cmdref: Format help_script() output as yoscrypt Or at least all of the synth commands, because they have the same preceding text. Except `synth_fabulous`, because that has unconditional `read_verilog`s at the start. Which seems like a bad idea and and not compatible with `-run`? --- kernel/register.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/register.cc b/kernel/register.cc index a688146ed..f0db7f7af 100644 --- a/kernel/register.cc +++ b/kernel/register.cc @@ -972,7 +972,11 @@ struct HelpPass : public Pass { } if (!current_buffer.empty()) { - current_listing->codeblock(current_buffer, "none", null_source); + if (current_buffer.size() > 64 && current_buffer.substr(0, 64).compare("The following commands are executed by this synthesis command:\n\n") == 0) { + current_listing->paragraph(current_buffer.substr(0, 62), null_source); + current_listing->codeblock(current_buffer.substr(64), "yoscrypt", null_source); + } else + current_listing->codeblock(current_buffer, "none", null_source); current_buffer = ""; } }