| 334 | /// Set the default identity. |
| 335 | #[derive(Debug, clap::Args)] |
| 336 | pub struct Default { |
| 337 | /// Name of the identity to set as default. |
| 338 | /// |
| 339 | /// If not provided with --clear, this is required. |
| 340 | #[arg(required_unless_present = "clear")] |
| 341 | pub name: Option<String>, |
| 342 | |
| 343 | /// Usage context to set the default for. |
| 344 | /// |
| 345 | /// If not specified, sets the global default. |
| 346 | #[arg(long, short = 'u')] |
| 347 | pub usage: Option<String>, |
| 348 | |
| 349 | /// Clear the default identity instead of setting one. |
| 350 | #[arg(long, conflicts_with = "name")] |
| 351 | pub clear: bool, |
| 352 | } |
| 353 | |
| 354 | impl Command for Default { |
| 355 | fn run(&self) -> CliResult<()> { |
nothing calls this directly
no outgoing calls
no test coverage detected