From 70277cc2baf6712a1ff144adadd98c0829708502 Mon Sep 17 00:00:00 2001 From: Tyarel8 <98483313+Tyarel8@users.noreply.github.com> Date: Sun, 22 Jun 2025 03:54:31 +0200 Subject: [PATCH] fix(std/help): `collect` windows `--help` output for gui programs (#16019) # Description Adding to #15962, I have realized that there are windows gui programs like `prismlauncher` or `firefox` that do accept the `--help` flag but won't output on the terminal unless `collect`ed, so now it collects the output on windows. # User-Facing Changes # Tests + Formatting # After Submitting --- crates/nu-std/std/help/mod.nu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/nu-std/std/help/mod.nu b/crates/nu-std/std/help/mod.nu index 86489fa188..570788d027 100644 --- a/crates/nu-std/std/help/mod.nu +++ b/crates/nu-std/std/help/mod.nu @@ -762,7 +762,7 @@ def external-commands [ let target_command = $command | str join " " | str replace "^" "" print $"(ansi default_italic)Help pages from external command ($target_command | pretty-cmd):(ansi reset)" if $env.NU_HELPER? == "--help" { - run-external ($target_command | split row " ") "--help" + run-external ($target_command | split row " ") "--help" | if $nu.os-info.name == "windows" { collect } else {} } else { ^($env.NU_HELPER? | default "man") $target_command }