-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from mdpadberg/renovate/clap-4.x
Update Rust crate clap to v4
- Loading branch information
Showing
5 changed files
with
40 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,44 @@ | ||
use crate::environment::EnvironmentCommands; | ||
use clap::Subcommand; | ||
use clap_complete::Shell; | ||
|
||
#[derive(clap::Subcommand, Debug)] | ||
#[derive(Subcommand, Debug)] | ||
pub enum Subcommands { | ||
/// Add, Remove, List environment (example cf-dev) | ||
#[clap(visible_alias = "env")] | ||
#[command(visible_alias = "env")] | ||
Environment { | ||
#[clap(subcommand)] | ||
#[command(subcommand)] | ||
environment_commands: EnvironmentCommands, | ||
}, | ||
/// Login to one of the Cloud Foundry environments | ||
#[clap(visible_alias = "l")] | ||
#[command(visible_alias = "l")] | ||
Login { | ||
/// Name of the environment (example "cf-dev") | ||
name: String, | ||
/// One-time passcode | ||
#[clap(long)] | ||
#[arg(long)] | ||
sso_passcode: Option<String>, | ||
/// Cloudfoundry organization | ||
#[clap(short,long)] | ||
#[arg(short,long)] | ||
org: Option<String>, | ||
/// Cloudfoundry space | ||
#[clap(short,long)] | ||
#[arg(short,long)] | ||
space: Option<String>, | ||
}, | ||
/// Execute command on Cloud Foundry environment | ||
#[clap(visible_alias = "e", trailing_var_arg = true)] | ||
#[command(visible_alias = "e", trailing_var_arg = true)] | ||
Exec { | ||
/// Names of the environments (example "cf-dev,cf-prod") | ||
names: String, | ||
/// Command you want to execute (example "logs your-application --recent") | ||
command: Vec<String>, | ||
/// Execute command sequentially (example "ssh your-application") | ||
#[clap(short, long)] | ||
#[arg(short, long)] | ||
sequential_mode: bool | ||
}, | ||
/// Generate shell autocompletion files | ||
Completion { | ||
#[clap(arg_enum, value_parser)] | ||
#[arg(value_enum)] | ||
shell: Shell, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters