Skip to main content

git_stk/commands/
uninstall.rs

1use anyhow::Result;
2use clap::ArgAction;
3
4use crate::commands::Run;
5
6/// Remove what `git stk setup` and the installer added: shell completion
7/// wiring, the man page, and the config/receipt directory. The binary itself
8/// is reported, not deleted.
9#[derive(Debug, clap::Args)]
10pub struct Uninstall {
11    /// Print what would be removed without removing anything.
12    #[arg(long, short = 'n', action = ArgAction::SetTrue)]
13    dry_run: bool,
14    /// Skip the confirmation prompt.
15    #[arg(long, short = 'y', action = ArgAction::SetTrue)]
16    yes: bool,
17}
18
19impl Run for Uninstall {
20    fn run(self) -> Result<()> {
21        crate::setup::uninstall(self.dry_run, self.yes)
22    }
23}