nix-editor icon indicating copy to clipboard operation
nix-editor copied to clipboard

multiple updates

Open tomberek opened this issue 3 years ago • 1 comments

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
}

tomberek avatar May 25 '22 11:05 tomberek

Ever since 0bd160e71b1b83df5ab20642448bb0b16dd82eef 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

vlinkz avatar Sep 15 '22 02:09 vlinkz