review completion command

This commit is contained in:
Clément DOUIN 2021-09-19 11:04:01 +02:00
parent 2bcad3ff87
commit c155d30e54
No known key found for this signature in database
GPG key ID: 69C9B9CFFDEE2DEF
2 changed files with 2 additions and 1 deletions

View file

@ -29,6 +29,7 @@ pub fn matches<'a>(m: &'a ArgMatches) -> Result<Option<Command<'a>>> {
/// Completion subcommands.
pub fn subcmds<'a>() -> Vec<App<'a, 'a>> {
vec![SubCommand::with_name("completion")
.aliases(&["completions", "compl", "compe", "comp"])
.about("Generates the completion script for the given shell")
.args(&[Arg::with_name("shell")
.possible_values(&Shell::variants()[..])

View file

@ -56,7 +56,7 @@ fn main() -> Result<()> {
let app = create_app();
let m = app.get_matches();
// Check completion match BEFORE any entity or service initialization.
// Check completion match BEFORE entities and services initialization.
// See https://github.com/soywod/himalaya/issues/115.
match compl::arg::matches(&m)? {
Some(compl::arg::Command::Generate(shell)) => {