Skip to main content

git_stk/commands/
setup.rs

1use anyhow::Result;
2use clap::ArgAction;
3
4use crate::commands::Run;
5
6/// Install the man page and wire up shell completions.
7#[derive(Debug, clap::Args)]
8pub struct Setup {
9    /// Skip confirmation prompts.
10    #[arg(long, short = 'y', action = ArgAction::SetTrue)]
11    yes: bool,
12    /// Only re-render generated assets (man page); never touch shell rc files.
13    #[arg(long, action = ArgAction::SetTrue, conflicts_with = "yes")]
14    refresh: bool,
15}
16
17impl Run for Setup {
18    fn run(self) -> Result<()> {
19        crate::setup::setup(self.yes, self.refresh)
20    }
21}