hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit aab34844ae8e365330ab7b682055a4e30d8112bf
parent d0fbc33e751f82c50a955a65a15d70bbdb1afda4
Author: Sebastian <sebastian@sebsite.pw>
Date:   Sat,  9 Dec 2023 21:16:00 -0500

haredoc: error out when more than one arg supplied

This is already what haredoc(1) and the help text say.

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mcmd/haredoc/main.ha | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/cmd/haredoc/main.ha b/cmd/haredoc/main.ha @@ -87,6 +87,11 @@ fn doc(name: str, cmd: *getopt::command) (void | error) = { fmt::fatal("Option -a must be used only with -Ftty"); }; + if (len(cmd.args) > 1) { + getopt::printusage(os::stderr, os::args[0], help)!; + os::exit(os::status::FAILURE); + }; + let ctx = module::context { harepath = harepath(), harecache = harecache(),