tummychow / git-absorb

git commit --fixup, but automatic
https://crates.io/crates/git-absorb
BSD 3-Clause "New" or "Revised" License
3.38k stars 58 forks source link

feat: adding terminal completion generation #36

Closed ahkrr closed 3 years ago

ahkrr commented 3 years ago

This PR adds the ability write generated shell completions to stdout.

The supported shells are bash, zsh, powershell, fish, elvish. This feature is present in clap.

A related Issue is: bash autocomplete #23

ahkrr commented 3 years ago

I just noticed that

touch src/* && cargo clippy gives this error

error: this if has identical blocks --> src/commute.rs:47:13 47 / { 48 // TODO: added start positions probably need to be 49 // tweaked here 50 return Some((second.clone(), first.clone())); 51 } _____^

= note: #[deny(clippy::if_same_then_else)] on by default

I am not knowledgeable about the behavior of this program but I thought I would point it out.

tummychow commented 3 years ago

tch that's a new clippy. i'm loath to combine those ifs into one because the conditions are so complex... i'll fix that on master later