From 4c97b3dd28cb2603d3d7af5cf9a597f4536ba407 Mon Sep 17 00:00:00 2001 From: Bram Geron Date: Thu, 16 Mar 2023 13:03:29 +0100 Subject: [PATCH] Exit successfully from `nu --help` for compatibility with halp (#8478) https://github.com/orhun/halp finds the correct help command by checking if `cmd --help` succeeds. All standard utilities I've tried exit successfully on `--help`, but not nushell. --- src/command.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command.rs b/src/command.rs index 7048f9e39b..4436c95f1b 100644 --- a/src/command.rs +++ b/src/command.rs @@ -155,7 +155,7 @@ pub(crate) fn parse_commandline_args( let _ = std::panic::catch_unwind(move || stdout_write_all_and_flush(full_help)); - std::process::exit(1); + std::process::exit(0); } if call.has_flag("version") {