diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cli.rs | 8 | ||||
-rw-r--r-- | src/main.rs | 18 |
2 files changed, 12 insertions, 14 deletions
diff --git a/src/cli.rs b/src/cli.rs index ba92be3..6f5abd2 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -180,13 +180,11 @@ pub enum SubscriptionCommand { #[arg(short, long)] force: bool, }, + /// Write all subscriptions in an format understood by `import` + Export {}, /// List all subscriptions - List { - /// Only show the URLs - #[arg(short, long)] - url: bool, - }, + List {}, } #[derive(Clone, Debug, Args)] diff --git a/src/main.rs b/src/main.rs index 3852b8e..7852aa0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -108,17 +108,17 @@ async fn main() -> Result<()> { .await .context("Failed to remove a subscription")?; } - SubscriptionCommand::List { url } => { + SubscriptionCommand::List {} => { let all_subs = get_subscriptions(&app).await?; - if url { - for val in all_subs.0.values() { - println!("{}", val.url); - } - } else { - for (key, val) in all_subs.0 { - println!("{}: '{}'", key, val.url); - } + for (key, val) in all_subs.0 { + println!("{}: '{}'", key, val.url); + } + } + SubscriptionCommand::Export {} => { + let all_subs = get_subscriptions(&app).await?; + for val in all_subs.0.values() { + println!("{}", val.url); } } SubscriptionCommand::Import { file, force } => { |