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

multiple updates #5

Open
tomberek opened this issue May 25, 2022 · 1 comment
Open

multiple updates #5

tomberek opened this issue May 25, 2022 · 1 comment

Comments

@tomberek
Copy link

Something along the lines of:

nix-editor [OPTIONS] <FILE> [<ATTRIBUTE> [--val <VAL>]]...
nix-editor file.nix name1 --val 0 name2 --val 2

or even perhaps take a json?

{
"name1": 0,
"name2": 2
}
@vlinkz
Copy link
Collaborator

vlinkz commented Sep 15, 2022

Ever since 0bd160e writing multiple values in the following form has been possible:

nix-editor ./file.nix something -v '{ a = 2; b = 2; }'

I'm thinking from there running something similar without a value could work, say

nix-editor ./file.nix --somearg '{ a = 2; b = 2; }'

would add a = 2 and b = 2 to the nix file

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