From f861893293629f4f8c315b8042295df049973e29 Mon Sep 17 00:00:00 2001 From: Jamie Quigley Date: Thu, 7 Apr 2022 06:32:11 +0100 Subject: Update to clap 3.1.x (#289) --- src/command/import.rs | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) (limited to 'src/command/import.rs') diff --git a/src/command/import.rs b/src/command/import.rs index 166fcd3e..7e2f5c5c 100644 --- a/src/command/import.rs +++ b/src/command/import.rs @@ -1,44 +1,30 @@ use std::{env, path::PathBuf}; use atuin_client::import::fish::Fish; +use clap::Parser; use eyre::{eyre, Result}; -use structopt::StructOpt; use atuin_client::import::{bash::Bash, zsh::Zsh}; use atuin_client::{database::Database, import::Importer}; use atuin_client::{history::History, import::resh::Resh}; use indicatif::ProgressBar; -#[derive(StructOpt)] +#[derive(Parser)] +#[clap(infer_subcommands = true)] pub enum Cmd { - #[structopt( - about="import history for the current shell", - aliases=&["a", "au", "aut"], - )] + /// Import history for the current shell Auto, - #[structopt( - about="import history from the zsh history file", - aliases=&["z", "zs"], - )] + /// Import history from the zsh history file Zsh, - #[structopt( - about="import history from the bash history file", - aliases=&["b", "ba", "bas"], - )] + /// Import history from the bash history file Bash, - #[structopt( - about="import history from the resh history file", - aliases=&["r", "re", "res"], - )] + /// Import history from the resh history file Resh, - #[structopt( - about="import history from the fish history file", - aliases=&["f", "fi", "fis"], - )] + /// Import history from the fish history file Fish, } -- cgit v1.3.1