mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-22 11:00:19 +00:00
review completion command
This commit is contained in:
parent
2bcad3ff87
commit
c155d30e54
2 changed files with 2 additions and 1 deletions
|
@ -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()[..])
|
||||
|
|
|
@ -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)) => {
|
||||
|
|
Loading…
Reference in a new issue