snowfallorg / nix-editor

A simple rust program to edit NixOS configuration files with just a command
MIT License
73 stars 6 forks source link

add option --inplace #11

Closed milahu closed 2 years ago

milahu commented 2 years ago

fix #9

milahu commented 2 years ago

thanks for the cleanup : )

edit: but still ... this is an invitation to user errors, for example accidentally replacing a config file with true, but having no backup of the file

maybe hide this behind a --force flag?

vlinkz commented 2 years ago

#[clap(requires("val"))] should prevent in-place editing without changing a value but right now it wouldn't work with -a option. Lemme read over the clap docs again

vlinkz commented 2 years ago

Looks great! Thanks for the PR!