feat(cli): quiet flag

Created the actual flag, but didn't implement.

I had underestimated the amount of global state and abstracting for
output it would take.

This will probably be essentially free after a refactor that I don't
wanna do right now, given how I spend most my energy on the
architectural overhaul.

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This commit is contained in:
Christina Sørensen 2023-07-03 11:16:43 +02:00
parent 2872f56aac
commit 0660801014
Signed by: cafkafk
GPG key ID: CDDC792F655251ED
3 changed files with 11 additions and 5 deletions

View file

@ -6,15 +6,16 @@
- [ ] Version pinning
- [ ] libgit2 (maybe)
- [ ] Category Flags Finished
* 0.1.0 [60%] [3/5]
- [ ] Implement Quiet flag
* 0.1.0 [80%] [4/5]
- [X] No functionality regressions
- [X] commit works in quick, fast
- [X] commit with edit works
- [X] Repo Flags Finished
- [X] Optional Fields
- [-] Subcommands
- [ ] Quiet flag
- [-] Do something about coc flag
- [X] Subcommands
- [X] Quiet flag (wont rn)
- [X] Do something about coc flag
- [ ] UX
- [ ] Change failure emotes
- [ ] Flag for disabling emotes

View file

@ -59,10 +59,14 @@ pub struct Args {
#[arg(long)]
pub warranty: bool,
/// Print code-of-conduct information (not implemented)
/// Print code-of-conduct information
#[arg(long)]
pub code_of_conduct: bool,
/// Try to be as quiet as possible (unix philosophy) (not imlemented)
#[arg(short, long)]
pub quiet: bool,
#[command(subcommand)]
pub command: Option<Commands>,
}

View file

@ -62,6 +62,7 @@ fn main() {
args if args.license => println!("{}", utils::strings::INTERACTIVE_LICENSE),
args if args.warranty => println!("{}", utils::strings::INTERACTIVE_WARRANTY),
args if args.code_of_conduct => println!("{}", utils::strings::INTERACTIVE_COC),
args if args.quiet => todo!(),
_ => (),
}
match &mut args.command {