Skip to content

Is --parser necessary? #154

Answered by TomWright
ryuheechul asked this question in Q&A
Discussion options

You must be logged in to vote

The ability to convert between data types was added in v1.7.0: https://github.com/TomWright/dasel/blob/master/CHANGELOG.md#v170---2020-11-30

Prior to this the -p flag was used to tell dasel which data type to expect when reading from stdin.

In order to keep backward compatibility the flag has to remain but as you say, you can essentially forget about it and just use -r since internally when no -w flag is provided, the -r value is used.

  • -r is shorthand for --read, which is used to set a read parser.
  • -w is shorthand for --write, which is used to set a write parser.
  • -p is shorthand for --parser, which is effectively an alias of -r <val> -w <val>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ryuheechul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants