Skip to content

Commit

Permalink
Add completion subcommand (#1968)
Browse files Browse the repository at this point in the history
* Add completion subcommand

* Remove old completion scripts

* Move completion logic
  • Loading branch information
tranzystorekk authored and Keats committed Feb 16, 2023
1 parent 567f103 commit 74c090a
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 466 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Expand Up @@ -13,8 +13,6 @@ keywords = ["static", "site", "generator", "blog"]
include = ["src/**/*", "LICENSE", "README.md"]

[build-dependencies]
clap = "3"
clap_complete = "3"
winres = "0.1"
time = "0.3"

Expand All @@ -23,6 +21,7 @@ name = "zola"

[dependencies]
clap = { version = "3", features = ["derive"] }
clap_complete = "3"
# Below is for the serve cmd
hyper = { version = "0.14.1", default-features = false, features = ["runtime", "server", "http2", "http1"] }
tokio = { version = "1.0.1", default-features = false, features = ["rt", "fs", "time"] }
Expand Down
10 changes: 0 additions & 10 deletions build.rs
@@ -1,7 +1,3 @@
// use clap::Shell;

include!("src/cli.rs");

fn generate_pe_header() {
use time::OffsetDateTime;

Expand All @@ -18,12 +14,6 @@ fn generate_pe_header() {
}

fn main() {
// disabled below as it fails in CI
// let mut app = build_cli();
// app.gen_completions("zola", Shell::Bash, "completions/");
// app.gen_completions("zola", Shell::Fish, "completions/");
// app.gen_completions("zola", Shell::Zsh, "completions/");
// app.gen_completions("zola", Shell::PowerShell, "completions/");
if std::env::var("CARGO_CFG_TARGET_OS").unwrap() != "windows"
&& std::env::var("PROFILE").unwrap() != "release"
{
Expand Down
144 changes: 0 additions & 144 deletions completions/_zola

This file was deleted.

93 changes: 0 additions & 93 deletions completions/_zola.ps1

This file was deleted.

0 comments on commit 74c090a

Please sign in to comment.