diff options
Diffstat (limited to 'src/opt.rs')
-rw-r--r-- | src/opt.rs | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,26 +1,26 @@ //! Command line options. use crate::cmd; +use clap::Parser; use std::path::PathBuf; -use structopt::StructOpt; /// A parsed command line. -#[derive(Debug, StructOpt)] -#[structopt(about = "maintain a journal")] +#[derive(Debug, Parser)] +#[clap(about = "maintain a journal")] pub struct Opt { /// Global options, common for all subcommands. - #[structopt(flatten)] + #[clap(flatten)] pub global: GlobalOptions, /// The subcommand. - #[structopt(subcommand)] + #[clap(subcommand)] pub cmd: SubCommand, } /// Global options. /// /// These options are common to all subcommands. -#[derive(Debug, StructOpt)] +#[derive(Debug, Parser)] pub struct GlobalOptions { /// Which configuration file to read. #[structopt(short, long, help = "Configuration file")] @@ -44,7 +44,7 @@ pub struct GlobalOptions { } /// A subcommand. -#[derive(Debug, StructOpt)] +#[derive(Debug, Parser)] pub enum SubCommand { /// Show configuration. Config(cmd::Config), |