1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use std::ffi::OsString;
use std::io::Error;
use std::io::Write;
use std::path::PathBuf;

#[deprecated(since = "3.0.0", note = "Renamed to `clap_complete`")]
pub use clap_complete::Generator;
#[deprecated(since = "3.0.0", note = "Renamed to `clap_complete`")]
pub use clap_complete::Shell;

#[deprecated(since = "3.0.0", note = "Renamed to `clap_complete::generators`")]
pub mod generators {
    pub use clap_complete::generator::*;
    pub use clap_complete::shells::*;
}

#[deprecated(since = "3.0.0", note = "Renamed to `clap_complete::utils`")]
pub mod utils {
    pub use clap_complete::generator::utils::*;
}

#[deprecated(since = "3.0.0", note = "Renamed to `clap_complete::generate_to`")]
pub fn generate_to<G, S, T>(
    gen: G,
    app: &mut clap::App,
    bin_name: S,
    out_dir: T,
) -> Result<PathBuf, Error>
where
    G: Generator,
    S: Into<String>,
    T: Into<OsString>,
{
    clap_complete::generate_to(gen, app, bin_name, out_dir)
}

#[deprecated(since = "3.0.0", note = "Renamed to `clap_complete`")]
pub fn generate<G, S>(gen: G, app: &mut clap::App, bin_name: S, buf: &mut dyn Write)
where
    G: Generator,
    S: Into<String>,
{
    clap_complete::generate(gen, app, bin_name, buf)
}