pub enum Command {
Add {
id: Option<String>,
uri: Option<String>,
ref_or_rev: Option<String>,
no_flake: bool,
shallow: bool,
},
Remove {
id: Option<String>,
},
Change {
id: Option<String>,
uri: Option<String>,
ref_or_rev: Option<String>,
shallow: bool,
},
List {
format: ListFormat,
},
Update {
id: Option<String>,
init: bool,
},
Pin {
id: Option<String>,
rev: Option<String>,
},
Unpin {
id: Option<String>,
},
Follow {
paths: Vec<PathBuf>,
},
AddFollow {
input: Option<String>,
target: Option<String>,
},
Completion {
inputs: bool,
mode: CompletionMode,
},
Config {
print_default: bool,
path: bool,
},
}Variants§
Add
Add a new flake reference.
Fields
Remove
Remove a specific flake reference based on its id.
Change
Change an existing flake reference’s URI.
Fields
List
List flake inputs
Fields
format: ListFormatUpdate
Update inputs to their latest specified release.
Fields
Pin
Pin inputs to their current or a specified rev.
Fields
Unpin
Unpin an input so it tracks the upstream default again.
Follow
Automatically add and remove follows declarations.
Analyzes the flake.lock to find nested inputs that match top-level inputs, then adds appropriate follows declarations and removes stale ones.
With file paths, processes multiple flakes in batch.
For every flake.nix file passed in it will assume a
flake.lock file exists in the same directory.
AddFollow
Manually add a single follows declaration.
Example: flake-edit add-follow rust-overlay.nixpkgs nixpkgs
This creates: rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
Without arguments, starts an interactive selection.
Fields
Completion
Meant for shell completions.
Config
Manage flake-edit configuration.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more