mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
fix new tpl sig
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
//! Module related to completion handling.
|
||||
//!
|
||||
//! This module gathers all completion actions triggered by the CLI.
|
||||
//! This module gathers all completion commands.
|
||||
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use clap::{App, Shell};
|
||||
use std::{io, str::FromStr};
|
||||
|
||||
/// Generate completion script from the given [`clap::App`] for the given shell slice.
|
||||
pub fn generate<'a>(shell: Option<&'a str>, mut app: App<'a, 'a>) -> Result<()> {
|
||||
pub fn generate<'a>(mut app: App<'a, 'a>, shell: Option<&'a str>) -> Result<()> {
|
||||
let shell = Shell::from_str(shell.unwrap_or_default())
|
||||
.map_err(|err| anyhow!(err))
|
||||
.context("cannot parse shell")?;
|
||||
|
||||
Reference in New Issue
Block a user