Skip to content

Commit

Permalink
clarify internal-run/README
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyBen committed Jan 9, 2025
1 parent 4a1b2b9 commit 549a544
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions examples/internal-run/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Internal Run Example

This example demonstrates how to utilize the internal `run` function in order
to call other commands internally, using the same syntax as would be used by
a user in the CLI.
This example demonstrates how to use the `run` function to call commands
internally, using the exact same syntax as a user would in the CLI. This
approach can be useful for chaining commands or reusing logic without
duplicating code.

This example was generated with:

Expand All @@ -14,6 +15,15 @@ $ bashly generate
$ bashly generate
```

Note that while this pattern of calling `run` internally is supported, you may
want to consider using [lib functions]
instead, for a more robust codebase.

While this pattern of calling run internally is supported, you may want to
consider using [lib functions](https://bashly.dannyb.co/usage/writing-your-scripts/#adding-common-functions)
instead. lib functions can help create a more robust and maintainable codebase
by centralizing reusable logic.

<!-- include: src/build_command.sh -->
<!-- include: src/test_command.sh -->
<!-- include: src/deploy_command.sh -->
Expand Down

0 comments on commit 549a544

Please sign in to comment.