From 533594641e8108710669714233f0ef2a5da5f6f7 Mon Sep 17 00:00:00 2001 From: Ky-Anh Huynh Date: Wed, 20 May 2020 21:34:14 +0200 Subject: [PATCH] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 36c0c60..00061b8 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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'