Skip to content

Commit

Permalink
Adding the example of usage of -p,--parameter <param-name param-value> (
Browse files Browse the repository at this point in the history
#55)

* Adding the example of usage of -p,--parameter <param-name param-value>

This is a port of the PR #54 as the commit

* Update README.md

Incorporated changes as suggested by @afelisatti

Co-authored-by: Julian Miras Hernandez <[email protected]>
  • Loading branch information
machaval and julian-miras authored Nov 14, 2022
1 parent e23888b commit 7d35b55
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,19 @@ curl https://jsonplaceholder.typicode.com/posts/1 | dw "output application/json
}
```
### Using parameters
Using the internal map `params`, we can access injected parameters in the command line with the `-p` option
```
dw -p myName Julian "output json --- { name : params.myName }"
```
#### Output
```
{
"name": "Julian"
}
```
## Contributions Welcome
Contributions to this project can be made through Pull Requests and Issues on the
Expand Down

0 comments on commit 7d35b55

Please sign in to comment.