mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 05:07:55 +08:00
review completion command
This commit is contained in:
@@ -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()[..])
|
||||
|
||||
+1
-1
@@ -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)) => {
|
||||
|
||||
Reference in New Issue
Block a user