1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use clap::{Parser, Subcommand};
#[derive(Debug, Parser)]
#[command(author, version, about, long_about = None)]
pub struct Opts {
#[command(subcommand)]
pub command: Option<AppCommand>,
}
#[derive(Debug, Subcommand)]
pub enum AppCommand {
/// Removes the cache folder
Clean,
/// Launches the Ri! Learn app
Learn,
/// Updates the launcher and apps
Update(UpdateCommand),
/*
/// Opens a link to the latest Stack version
Stack,
*/
}
impl Default for AppCommand {
fn default() -> Self {
Self::Learn
}
}
#[derive(Debug, Parser, Clone)]
pub struct UpdateCommand {
/// Override an operating system of downloading assets
#[clap(long, short)]
pub system: Option<String>,
/// Reload assets
#[clap(long, short)]
pub force: bool,
}