Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put Document #67

Closed
TomWright opened this issue Dec 18, 2020 · 0 comments · Fixed by #69
Closed

Put Document #67

TomWright opened this issue Dec 18, 2020 · 0 comments · Fixed by #69
Labels
enhancement New feature or request

Comments

@TomWright
Copy link
Owner

Is your feature request related to a problem? Please describe.
I would like to be able to put a document into a specific place within some data.

I can already put single variables/objects into data, but this requires you to define each property separately and cannot handle an entire document/nested set of objects.

Describe the solution you'd like
A new dasel put document command that will decode the value given to it, and put that into the data.

By default, the same parser as the original document will be used but you should be able to override this with a -d, --document-parser flag.

Additional context
Example usage:

echo 'foo: true
bar: 5
baz:
  qux: false
  quux: "yes"
  quuz: 7' | dasel put document --d json '.baz' '{
  "qux": false,
  "quux": "no",
  "quuz": 8
}'

Should output:

echo 'foo: true
bar: 5
baz:
  qux: false
  quux: "no"
  quuz: 8
@TomWright TomWright added the enhancement New feature or request label Dec 18, 2020
@TomWright TomWright linked a pull request Dec 19, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant