You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-9Lines changed: 24 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ mask test
91
91
92
92
### Positional arguments
93
93
94
-
These are defined beside the command name within `(round_brackets)`. They are required arguments that must be supplied for the command to run. [Optional args][2] are coming soon. The argument name is injected into the script's scope as an environment variable.
94
+
These are defined beside the command name within `(round_brackets)`. They are required arguments that must be supplied for the command to run. The argument name is injected into the script's scope as an environment variable.
95
95
96
96
**Example:**
97
97
@@ -105,6 +105,24 @@ echo "Testing $test_case in $file"
105
105
~~~
106
106
```
107
107
108
+
Optional arguments are defined within `[square_brackets]`.
109
+
110
+
**Example:**
111
+
112
+
```markdown
113
+
## test [test_file]
114
+
115
+
> Run tests
116
+
117
+
~~~bash
118
+
if [[ -n "$test_file" ]]; then
119
+
echo "Run tests in $test_file..."
120
+
else
121
+
echo "Running all tests...."
122
+
fi
123
+
~~~
124
+
```
125
+
108
126
### Named flags
109
127
110
128
You can define a list of named flags for your commands. The flag name is injected into the script's scope as an environment variable.
0 commit comments