11// SPDX-License-Identifier: MIT
22// SPDX-FileCopyrightText: 2025 Lee Cannon <[email protected] > 33
4+ // STEPS TO CREATE A NEW COMMAND:
5+ // - Copy this file and rename it to the name of the command
6+ // - Search the new file for "CHANGE THIS" and update the code
7+ // - Add the new command to `src/subcommands/listing.zig`
8+ // - Implement the functionality
9+ // - Add tests
10+ // - PROFIT
11+
412/// Is this command enabled for the current target?
5- pub const enabled : bool = true ; // USE `shared.target_os` TO DETERMINE IF THE COMMAND IS ENABLED FOR THE CURRENT TARGET
13+ pub const enabled : bool = true ; // CHANGE THIS - USE `shared.target_os` TO DETERMINE IF THE COMMAND IS ENABLED FOR THE CURRENT TARGET
614
715pub const command : Command = .{
816 .name = "template" , // CHANGE THIS
@@ -19,7 +27,9 @@ pub const command: Command = .{
1927 \\
2028 ,
2129
22- // ADD `.extended_help` IF EXAMPLES SHOULD BE DISPLAYED
30+ .extended_help = // CHANGE THIS - ADD EXAMPLES OR DELETE THIS IF NO EXAMPLES ARE NEEDED
31+ \\
32+ ,
2333
2434 .execute = impl .execute ,
2535};
@@ -42,7 +52,7 @@ const impl = struct {
4252 log .debug ("options={}" , .{options });
4353 }
4454
45- const TemplateOptions = struct {
55+ const TemplateOptions = struct { // CHANGE THIS - IF NO OPTIONS ARE NEEDED DELETE THIS
4656 pub fn format (
4757 options : TemplateOptions ,
4858 comptime _ : []const u8 ,
@@ -129,19 +139,19 @@ const impl = struct {
129139 };
130140 }
131141
132- test "template no args" {
142+ test "template no args" { // CHANGE THIS
133143 try command .testExecute (&.{}, .{});
134144 }
135145
136- test "template help" {
146+ test "template help" { // CHANGE THIS
137147 try command .testHelp (true );
138148 }
139149
140- test "template version" {
150+ test "template version" { // CHANGE THIS
141151 try command .testVersion ();
142152 }
143153
144- test "template fuzz" { // DELETE THIS IF THE COMMAND INTERACTS WITH THE SYSTEM
154+ test "template fuzz" { // CHANGE THIS - DELETE THIS IF THE COMMAND INTERACTS WITH THE SYSTEM
145155 try command .testFuzz (.{});
146156 }
147157};
0 commit comments