Skip to content

Commit 6e2344f

Browse files
Add Automatic Variables section.
1 parent 6246aa2 commit 6e2344f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/generate_manual.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ echo "## Manual for rust-parallel $VERSION"
1111
echo '
1212
1. [Command line options](#command-line-options)
1313
1. [Commands from arguments](#commands-from-arguments)
14+
1. [Automatic variables](#automatic-variables)
1415
1. [Commands from stdin](#commands-from-stdin)
1516
1. [Command and initial arguments on command line](#command-and-initial-arguments-on-command-line)
1617
1. [Reading multiple inputs](#reading-multiple-inputs)
@@ -58,14 +59,18 @@ echo '
5859
$ rust-parallel gzip -k ::: *.html
5960
```'
6061

61-
echo 'Variables `{0}`, `{1}`, etc are automatically available based on the number of arguments. `{0}` will be replaced by the entire input line, and other groups match individual argument groups This is useful for building more complex command lines. For example:
62+
echo '### Automatic Variables'
63+
64+
echo 'When using commands from arguments, numbered variables `{0}`, `{1}`, etc are automatically available based on the number of arguments. `{0}` will be replaced by the entire input line, and other groups match individual argument groups This is useful for building more complex command lines. For example:
6265
'
6366

6467
echo '```
6568
$ rust-parallel echo group0={0} group1={1} group2={2} group3={3} group2again={2} ::: A B ::: C D ::: E F G'
6669
$RUST_PARALLEL echo group0={0} group1={1} group2={2} group3={3} group2again={2} ::: A B ::: C D ::: E F G
6770
echo '```'
6871

72+
echo 'Internally these variables are implemented using an auto-generated [regular expression](#regular-expression). If a regular expression is manually specified this will override the auto-generated one.'
73+
6974
echo '## Commands from stdin
7075
7176
Run complete commands from stdin.

0 commit comments

Comments
 (0)