diff --git a/README.md b/README.md index 2baa18b..273df2a 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ `flake-edit` has the following cli interface: `$ flake-edit help` + ``` Edit your flake inputs with ease @@ -19,14 +20,14 @@ Usage: flake-edit [OPTIONS] [FLAKE_REF] Commands: add Add a new flake reference - pin - Pin a specific flake reference based on its id change - Change a specific flake reference based on its id + remove Remove a specific flake reference based on its id list List flake inputs + update + Update inputs to their latest specified release help Print this message or the help of the given subcommand(s) @@ -37,10 +38,10 @@ Arguments: Options: --flake - --health - Checks for potential errors in the setup - --ref-or-rev - Pin to a specific ref_or_rev + --diff + Print a diff of the changes, will set the apply flag to false + --apply + Whether to apply possible changes -h, --help Print help -V, --version @@ -49,6 +50,7 @@ Options: ### `$ flake-edit add` `$ flake-edit help add` + ``` Add a new flake reference @@ -62,9 +64,9 @@ Arguments: Options: --ref-or-rev - - --force - Allow operations on uncommitted files + Pin to a specific ref_or_rev + -n, --no-flake + The input itself is not a flake -h, --help Print help ``` @@ -77,6 +79,7 @@ For some inputs, the uri can be put in directly and the id and type will be infe ### `$ flake-edit remove` `$ flake-edit help remove` + ``` Remove a specific flake reference based on its id @@ -94,6 +97,7 @@ Options: ### `$ flake-edit list` `$ flake-edit help list` + ``` List flake inputs diff --git a/src/bin/flake-edit/cli.rs b/src/bin/flake-edit/cli.rs index ae8b568..c540537 100644 --- a/src/bin/flake-edit/cli.rs +++ b/src/bin/flake-edit/cli.rs @@ -14,12 +14,6 @@ pub struct CliArgs { // The flake ref, or id that should be passed through to the nix command // By default will choose the local flake. flake_ref: Option, - /// Checks for potential errors in the setup - #[arg(long)] - health: bool, - /// Pin to a specific ref_or_rev - #[arg(long)] - ref_or_rev: Option, /// Print a diff of the changes, will set the apply flag to false. #[arg(long, default_value_t = false)] diff: bool, @@ -81,18 +75,13 @@ pub(crate) enum Command { // #[arg(last = true)] uri: Option, #[arg(long)] + /// Pin to a specific ref_or_rev ref_or_rev: Option, - /// Allow operations on uncommitted files. - #[arg(long)] - force: Option, /// The input itself is not a flake. #[arg(long, short)] no_flake: bool, }, - /// Pin a specific flake reference based on its id. - #[command(alias = "p", arg_required_else_help = true)] - Pin { id: Option }, - /// Change a specific flake reference based on its id. + // /// Change a specific flake reference based on its id. #[command(alias = "c", arg_required_else_help = true)] Change { id: Option, diff --git a/src/bin/flake-edit/main.rs b/src/bin/flake-edit/main.rs index 8a02bef..7e03c54 100644 --- a/src/bin/flake-edit/main.rs +++ b/src/bin/flake-edit/main.rs @@ -46,7 +46,6 @@ fn main() -> eyre::Result<()> { uri, ref_or_rev: _, id, - force: _, no_flake, } => { if id.is_some() && uri.is_some() { @@ -86,7 +85,6 @@ fn main() -> eyre::Result<()> { } } } - cli::Command::Pin { .. } => todo!(), cli::Command::Remove { id } => { if let Some(id) = id { change = Change::Remove {