use claps variant list

This commit is contained in:
shimun 2020-10-13 19:27:59 +02:00
parent 716a845e55
commit e5c6ca9237
Signed by: shimun
GPG Key ID: E81D8382DC2F971B

View File

@ -2,7 +2,7 @@ use std::fmt::{Display, Error, Formatter};
use std::hash::{Hash, Hasher};
use std::path::PathBuf;
use std::str::FromStr;
use structopt::clap::AppSettings;
use structopt::clap::{AppSettings, Shell};
use structopt::StructOpt;
mod config;
@ -253,8 +253,8 @@ pub enum Command {
/// Generate bash completion scripts
#[structopt(name = "completions", setting = AppSettings::Hidden)]
GenerateCompletions {
/// Shell to generate completions for: bash, fish
#[structopt(possible_values = &["bash", "fish"])]
/// Shell to generate completions for
#[structopt(possible_values = &Shell::variants()[..])]
shell: String,
out_dir: PathBuf,
},