From b9d5866dde82e4eaf936973b7ec519829fdeaae2 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Sun, 24 May 2020 22:55:47 +0300 Subject: [PATCH 1/3] Remove outdated notice about needing Rust nightly, builds fine on stable --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index 9034bb4..3804c83 100644 --- a/README.md +++ b/README.md @@ -33,13 +33,7 @@ page](https://github.com/vmchale/tin-summer/releases). If your platform doesn't have binaries, or you just want to build from source, get [cargo](https://rustup.rs/). Then: ```bash - $ cargo install tin-summer -``` - -Make sure you are on nightly; otherwise - -```bash - $ rustup run nightly cargo install tin-summer +$ cargo install tin-summer ``` ## Use From 153872e7b9514dde2e287e97e91dbe74ee881f26 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Sun, 24 May 2020 22:59:28 +0300 Subject: [PATCH 2/3] Fix spelling error in Debian package metadata --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1cc0bc4..a2492dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/vmchale/tin-summer" version = "1.21.13" [metadata.deb] -extended-description = "Command-line tool written as a partial replacement for du. Automitically sniffs our build artifacts and can optionally clean them as well." +extended-description = "Command-line tool written as a partial replacement for du. Automatically sniffs our build artifacts and can optionally clean them as well." license-file = ["LICENSE"] [[bin]] From 237e23d83d12db2e1f7317b8c2abede85690b216 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Sun, 24 May 2020 23:31:15 +0300 Subject: [PATCH 3/3] Add feature to build ZSH completions --- Cargo.toml | 1 + build.rs | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a2492dd..1c5a9ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,6 +46,7 @@ deutsch = [] english = [] fish = [] francais = [] +zsh = [] [lib] name = "liboskar" diff --git a/build.rs b/build.rs index a018679..4eeafe6 100644 --- a/build.rs +++ b/build.rs @@ -24,14 +24,25 @@ fn main() { let yaml = load_yaml!("src/cli/options-fr.yml"); #[cfg(feature = "deutsch")] let yaml = load_yaml!("src/cli/options-de.yml"); - let mut app = App::from_yaml(yaml).version(crate_version!()); // generate bash completions if desired #[cfg(feature = "bash")] - app.gen_completions("sn", Shell::Bash, env!("BASH_COMPLETIONS_DIR")); + { + let mut app = App::from_yaml(yaml).version(crate_version!()); + app.gen_completions("sn", Shell::Bash, env!("BASH_COMPLETIONS_DIR")); + } // generate fish completions if desired - let mut app_snd = App::from_yaml(yaml).version(crate_version!()); #[cfg(feature = "fish")] - app_snd.gen_completions("sn", Shell::Fish, env!("FISH_COMPLETIONS_DIR")); + { + let mut app = App::from_yaml(yaml).version(crate_version!()); + app.gen_completions("sn", Shell::Fish, env!("FISH_COMPLETIONS_DIR")); + } + + // generate fish completions if desired + #[cfg(feature = "zsh")] + { + let mut app = App::from_yaml(yaml).version(crate_version!()); + app.gen_completions("sn", Shell::Zsh, env!("ZSH_COMPLETIONS_DIR")); + } }