Add init command
This commit is contained in:
parent
495dac4bb3
commit
1441b83a14
1 changed files with 11 additions and 0 deletions
11
src/main.rs
11
src/main.rs
|
|
@ -3,6 +3,15 @@ use std::path::PathBuf;
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use directories::ProjectDirs;
|
use directories::ProjectDirs;
|
||||||
|
|
||||||
|
/// Initialize the note repository.
|
||||||
|
#[derive(Debug, Parser)]
|
||||||
|
struct CmdInit {}
|
||||||
|
|
||||||
|
#[derive(Debug, Parser)]
|
||||||
|
enum Command {
|
||||||
|
Init(CmdInit),
|
||||||
|
}
|
||||||
|
|
||||||
/// GedächtNAS - external storage for your brain.
|
/// GedächtNAS - external storage for your brain.
|
||||||
#[derive(Debug, Parser)]
|
#[derive(Debug, Parser)]
|
||||||
#[command(version)]
|
#[command(version)]
|
||||||
|
|
@ -10,6 +19,8 @@ struct Args {
|
||||||
/// Path to the config file.
|
/// Path to the config file.
|
||||||
#[arg(long, short)]
|
#[arg(long, short)]
|
||||||
config: Option<PathBuf>,
|
config: Option<PathBuf>,
|
||||||
|
#[command(subcommand)]
|
||||||
|
cmd: Command,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue