diff --git a/.github/config-schema.json b/.github/config-schema.json index ccbac402..1ac60a99 100644 --- a/.github/config-schema.json +++ b/.github/config-schema.json @@ -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": { diff --git a/docs/config/README.md b/docs/config/README.md index a0ef964e..d98d6939 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -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 diff --git a/src/configs/aws.rs b/src/configs/aws.rs index c6810477..47330324 100644 --- a/src/configs/aws.rs +++ b/src/configs/aws.rs @@ -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, diff --git a/src/modules/aws.rs b/src/modules/aws.rs index 3db65c56..3abf5621 100644 --- a/src/modules/aws.rs +++ b/src/modules/aws.rs @@ -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);