diff options
| author | Jamie Quigley <jamie@quigley.xyz> | 2022-04-07 06:32:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-07 06:32:11 +0100 |
| commit | f861893293629f4f8c315b8042295df049973e29 (patch) | |
| tree | 995af6417a0e02a05478703023f9c9438f9ac500 /src/command/import.rs | |
| parent | Add compact mode (#288) (diff) | |
| download | atuin-f861893293629f4f8c315b8042295df049973e29.zip | |
Update to clap 3.1.x (#289)
Diffstat (limited to '')
| -rw-r--r-- | src/command/import.rs | 30 |
1 files changed, 8 insertions, 22 deletions
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, } |
