Skip to content

Commit

Permalink
Update examples/
Browse files Browse the repository at this point in the history
  • Loading branch information
PrajwalCH committed Oct 25, 2022
1 parent 59e9c24 commit 9accd37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/git.zig
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ pub fn main() anyerror!void {

var cmd_pull = app.createCommand("pull", "Fetch from remote branch and merge it to local");
try cmd_pull.takesSingleValue("REMOTE");
cmd_pull.argRequired(true);
cmd_pull.applySetting(.arg_required);

var cmd_push = app.createCommand("push", "Update the remote branch");
try cmd_push.takesSingleValue("REMOTE");
try cmd_push.takesSingleValue("BRANCH_NAME");
cmd_push.argRequired(true);
cmd_push.applySetting(.arg_required);

try git.addSubcommand(app.createCommand("init", "Create an empty Git repository or reinitialize an existing one"));
try git.addSubcommand(cmd_commit);
Expand Down
2 changes: 1 addition & 1 deletion examples/touch.zig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn main() anyerror!void {
var touch = app.rootCommand();

try touch.takesSingleValue("FILE_NAME");
touch.argRequired(true);
touch.applySetting(.arg_required);

try touch.addArg(flag.boolean("no-create", 'c', "Do not create any files"));
try touch.addArg(flag.boolean("version", 'v', "Display app version"));
Expand Down

0 comments on commit 9accd37

Please sign in to comment.