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

interface could be better - similar to jq #13

Closed
milahu opened this issue Sep 14, 2022 · 3 comments
Closed

interface could be better - similar to jq #13

milahu opened this issue Sep 14, 2022 · 3 comments

Comments

@milahu
Copy link
Contributor

milahu commented Sep 14, 2022

the interface could be better - similar to jq

$ echo '{}' | jq  # identity
{}

$ echo '{}' | jq -c '.a=1 | .b=2' # set multiple values
{"a":1,"b":2}

$ echo '{}' | jq -c '.a=1 | .b=2' | jq -c '.c=3 | .d=4' # chaining
{"a":1,"b":2,"c":3,"d":4}

set multiple values

#5

see also jaq - A jq clone focussed on correctness, speed, and simplicity

@vlinkz
Copy link
Collaborator

vlinkz commented Sep 15, 2022

I feel that since the current argument structure has been around for a bit I wouldn't want to just change it now, however for a more minimal solely command-line focuses tool could be made using nix-editor as a crate since all of the important functions are public exports, maybe nix-editor-ng or something? Also reminds me I really need to write some documentation explaining everything

@milahu
Copy link
Contributor Author

milahu commented Sep 15, 2022

just bump the major version to release a new API

@vlinkz
Copy link
Collaborator

vlinkz commented Sep 15, 2022

I really don't want to change the interface as it is right now, as it already does what it is supposed to do. I'm open to adding features, but don't want to make many major changes to the interface at this moment.

As for multiple values being set, I'll look into implementing the method I described in #5

That being said the main goal of this project is to provide a crate module for other tools to easily manage and edit .nix files, so while I don't currently have plans of making a jq-like tool, I would definitely support anyone who had an interest in doing so

@vlinkz vlinkz closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants