mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-24 13:47:38 +00:00
chore(aws): adds space to the duration variable (#3872)
This commit is contained in:
parent
b79df46e0d
commit
6def45b751
4
.github/config-schema.json
vendored
4
.github/config-schema.json
vendored
@ -12,7 +12,7 @@
|
||||
"disabled": false,
|
||||
"expiration_symbol": "X",
|
||||
"force_display": false,
|
||||
"format": "on [$symbol($profile )(\\($region\\) )(\\[$duration\\])]($style)",
|
||||
"format": "on [$symbol($profile )(\\($region\\) )(\\[$duration\\] )]($style)",
|
||||
"profile_aliases": {},
|
||||
"region_aliases": {},
|
||||
"style": "bold yellow",
|
||||
@ -1479,7 +1479,7 @@
|
||||
"properties": {
|
||||
"format": {
|
||||
"description": "The format for the module.",
|
||||
"default": "on [$symbol($profile )(\\($region\\) )(\\[$duration\\])]($style)",
|
||||
"default": "on [$symbol($profile )(\\($region\\) )(\\[$duration\\] )]($style)",
|
||||
"type": "string"
|
||||
},
|
||||
"symbol": {
|
||||
|
@ -306,16 +306,16 @@ date is read from the `AWSUME_EXPIRATION` env var.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\])]($style)'` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. |
|
||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||
| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. |
|
||||
| `style` | `"bold yellow"` | The style for the module. |
|
||||
| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
|
||||
| `disabled` | `false` | Disables the `AWS` module. |
|
||||
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
|
||||
|
||||
### Variables
|
||||
|
||||
|
@ -50,7 +50,7 @@ pub struct AwsConfig<'a> {
|
||||
impl<'a> Default for AwsConfig<'a> {
|
||||
fn default() -> Self {
|
||||
AwsConfig {
|
||||
format: "on [$symbol($profile )(\\($region\\) )(\\[$duration\\])]($style)",
|
||||
format: "on [$symbol($profile )(\\($region\\) )(\\[$duration\\] )]($style)",
|
||||
symbol: "☁️ ",
|
||||
style: "bold yellow",
|
||||
disabled: false,
|
||||
|
@ -633,7 +633,7 @@ credential_process = /opt/bin/awscreds-retriever
|
||||
"on {}",
|
||||
Color::Yellow
|
||||
.bold()
|
||||
.paint("☁️ astronauts (ap-northeast-2) [30m]")
|
||||
.paint("☁️ astronauts (ap-northeast-2) [30m] ")
|
||||
));
|
||||
|
||||
assert_eq!(expected, actual);
|
||||
@ -679,7 +679,7 @@ expiration={}
|
||||
// on shared runners may delay it. Allow for up to 2 seconds of delay.
|
||||
let possible_values = ["30m", "29m59s", "29m58s"];
|
||||
let possible_values = possible_values.map(|duration| {
|
||||
let segment_colored = format!("☁️ astronauts (ap-northeast-2) [{}]", duration);
|
||||
let segment_colored = format!("☁️ astronauts (ap-northeast-2) [{}] ", duration);
|
||||
Some(format!(
|
||||
"on {}",
|
||||
Color::Yellow.bold().paint(segment_colored)
|
||||
@ -736,7 +736,7 @@ expiration={}
|
||||
"on {}",
|
||||
Color::Yellow
|
||||
.bold()
|
||||
.paint(format!("☁️ astronauts (ap-northeast-2) [{}]", symbol))
|
||||
.paint(format!("☁️ astronauts (ap-northeast-2) [{}] ", symbol))
|
||||
));
|
||||
|
||||
assert_eq!(expected, actual);
|
||||
|
Loading…
Reference in New Issue
Block a user