Skip to content

Commit

Permalink
chore: Make all short args explicit (#29) (#59)
Browse files Browse the repository at this point in the history
Resolves: #29

Signed-off-by: Vaibhav Rabber <[email protected]>
  • Loading branch information
vrongmeal authored Dec 6, 2024
1 parent a5ea940 commit 32cc25e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ enum Commands {
/// List basins.
ListBasins {
/// Filter to basin names that begin with this prefix.
#[arg(short, long, default_value = "")]
#[arg(short = 'p', long, default_value = "")]
prefix: Option<String>,

/// Filter to basin names that lexicographically start after this name.
#[arg(short, long, default_value = "")]
#[arg(short = 's', long, default_value = "")]
start_after: Option<String>,

/// Number of results, upto a maximum of 1000.
#[arg(short, long, default_value = "0")]
#[arg(short = 'n', long, default_value = "0")]
limit: Option<usize>,
},

Expand Down Expand Up @@ -118,15 +118,15 @@ enum Commands {
basin: BasinName,

/// Filter to stream names that begin with this prefix.
#[arg(short, long)]
#[arg(short = 'p', long)]
prefix: Option<String>,

/// Filter to stream names that lexicographically start after this name.
#[arg(short, long)]
#[arg(short = 's', long)]
start_after: Option<String>,

/// Number of results, upto a maximum of 1000.
#[arg(short, long)]
#[arg(short = 'n', long)]
limit: Option<usize>,
},

Expand Down Expand Up @@ -277,7 +277,7 @@ enum ConfigActions {
/// Set the authentication token to be reused in subsequent commands.
/// Alternatively, use the S2_AUTH_TOKEN environment variable.
Set {
#[arg(short, long)]
#[arg(short = 'a', long)]
auth_token: String,
},
}
Expand Down
4 changes: 2 additions & 2 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ pub struct BasinConfig {

#[derive(Parser, Debug, Clone, Serialize)]
pub struct StreamConfig {
#[arg(short, long)]
#[arg(short = 's', long)]
/// Storage class for a stream.
pub storage_class: Option<StorageClass>,
#[arg(short, long, help("Example: 1d, 1w, 1y"))]
#[arg(short = 'r', long, help("Example: 1d, 1w, 1y"))]
/// Retention policy for a stream.
pub retention_policy: Option<RetentionPolicy>,
}
Expand Down

0 comments on commit 32cc25e

Please sign in to comment.