Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ZSH completions and fix build notice #31

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down Expand Up @@ -46,6 +46,7 @@ deutsch = []
english = []
fish = []
francais = []
zsh = []

[lib]
name = "liboskar"
Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 15 additions & 4 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
}