From e8f3f6c4f3d1afd51a2bb5a82c9f4e145a0d385f Mon Sep 17 00:00:00 2001
From: Rob Landley
Date: Sun, 5 Sep 2021 17:32:40 -0500
Subject: [PATCH] Explain a corner case where the source filename matching the
first command name is relevant.
---
www/code.html | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/www/code.html b/www/code.html
index 25a18193..6cbaf7de 100644
--- a/www/code.html
+++ b/www/code.html
@@ -241,7 +241,13 @@ If you specified two-character command line arguments in
NEWTOY(), the first few global variables will be initialized by the automatic
argument parsing logic, and the type and order of these variables must
correspond to the arguments specified in NEWTOY().
-(See lib/args.c for details.)
+(See lib/args.c for details.)
+
+NOTE: the GLOBALS() block creates a "this.filename" entry
+in generated/globals.h. If your toys/*/filename.c does not match the first
+command name, you'll need to "#define TT this.filename" yourself before
+#including toys.h if you want to use TT globals
+
Rename hello_main() to yourcommand_main(). This is the main() function
where execution of your command starts. Your command line options are
--
2.39.2