Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
icy authored May 20, 2020
1 parent c972453 commit 5335946
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ whose names match a predefined prefix/regexp.
This option doesn't work when `-v` is used.
* `-p regexp`: Limit substitution to variables that match this prefix.
You can use some regular expression as prefix.
Default to `[^}]+`.
Default to `[^}]+`. Can be used as an alternative
to `SHELL-FORMAT` option in the original GNU `envsubst`

It's highly recommended to use `-u` option. It's the original idea
why this tool was written.
Expand Down Expand Up @@ -65,8 +66,9 @@ To limit substitution to variables that match some prefix, use `-p` option:
The second command raises an error because the variable `TEST_VAR` matches
the expected prefix `TEST_` and its value is not set.

You can also specify exactly a few variables to be substituted (which is exactly an alternative
to the `shell-format` in the original GNU tool `envsubst`:
You can also specify exactly a few variables to be substituted
(which is exactly an alternative to the `shell-format` option
in the original GNU tool `envsubst`):

$ echo '${TEST_VAR}' | ./genvsub -u -p 'VAR_NAME_3|VAR_NAME_3|VAR_NAME_3'

Expand Down

0 comments on commit 5335946

Please sign in to comment.