mirror of
https://github.com/nix-community/nurl.git
synced 2024-09-11 10:10:39 +03:00
remove --list-possible-fetchers since all fetchers are possible
This commit is contained in:
parent
e2eee849f2
commit
c854935b1a
@ -53,7 +53,6 @@ Options:
|
||||
-O, --overwrite-str <NAME> <STRING> same as --overwrite, but accepts strings instead Nix
|
||||
expressions
|
||||
-l, --list-fetchers List all available fetchers
|
||||
-L, --list-possible-fetchers List all fetchers that can be generated without --fetcher
|
||||
-h, --help Print help information
|
||||
-V, --version Print version information
|
||||
```
|
||||
@ -64,7 +63,7 @@ Options:
|
||||
- `nix-prefetch` relies on FOD which is slow, `nurl` tries to use alternatives when possible.
|
||||
- `nix-prefetch` supports arbitrary expressions (planned for `nurl`) and file attributes.
|
||||
- `nix-prefetch` is more configurable and has an interface similar to `nix-build`.
|
||||
- `nurl` has some nice features dedicated to generated packages (`--indent`, `--list-possible-fetchers`).
|
||||
- `nurl` has some nice features dedicated to generated packages (`--indent`, `--list-fetchers`).
|
||||
|
||||
## Changelog
|
||||
|
||||
|
@ -66,10 +66,6 @@ pub struct Opts {
|
||||
/// List all available fetchers
|
||||
#[arg(short, long, group = "command")]
|
||||
pub list_fetchers: bool,
|
||||
|
||||
/// List all fetchers that can be generated without --fetcher
|
||||
#[arg(short = 'L', long, group = "command")]
|
||||
pub list_possible_fetchers: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, ValueEnum)]
|
||||
|
11
src/main.rs
11
src/main.rs
@ -30,12 +30,13 @@ pub enum GitScheme {
|
||||
fn main() -> Result<()> {
|
||||
let opts = Opts::parse();
|
||||
|
||||
if opts.list_fetchers || opts.list_possible_fetchers {
|
||||
if opts.list_fetchers {
|
||||
let mut out = stdout().lock();
|
||||
for fetcher in FetcherFunction::value_variants() {
|
||||
if let Some(fetcher) = fetcher.to_possible_value() {
|
||||
writeln!(out, "{}", fetcher.get_name())?;
|
||||
}
|
||||
for fetcher in FetcherFunction::value_variants()
|
||||
.iter()
|
||||
.filter_map(ValueEnum::to_possible_value)
|
||||
{
|
||||
writeln!(out, "{}", fetcher.get_name())?;
|
||||
}
|
||||
return Ok(());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user