mirror of
https://github.com/starship/starship.git
synced 2025-04-21 10:19:25 +02:00
style(aws): Add spacing between profile and region (#2417)
and also after the symbol when using the Nerd font glyph.
This commit is contained in:
parent
7385dc27a9
commit
fb6cefa4b5
@ -253,7 +253,7 @@ is read from the `AWS_VAULT` env var.
|
|||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ---------------- | ---------------------------------------------- | --------------------------------------------------------------- |
|
| ---------------- | ---------------------------------------------- | --------------------------------------------------------------- |
|
||||||
| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. |
|
| `format` | `'on [$symbol($profile )(\($region\) )]($style)'` | The format for the module. |
|
||||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||||
| `style` | `"bold yellow"` | The style for the module. |
|
| `style` | `"bold yellow"` | The style for the module. |
|
||||||
@ -278,7 +278,7 @@ is read from the `AWS_VAULT` env var.
|
|||||||
# ~/.config/starship.toml
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
[aws]
|
[aws]
|
||||||
format = 'on [$symbol$profile(\($region\))]($style) '
|
format = 'on [$symbol($profile )(\($region\) )]($style)'
|
||||||
style = "bold blue"
|
style = "bold blue"
|
||||||
symbol = "🅰 "
|
symbol = "🅰 "
|
||||||
[aws.region_aliases]
|
[aws.region_aliases]
|
||||||
|
@ -14,7 +14,7 @@ pub struct AwsConfig<'a> {
|
|||||||
impl<'a> RootModuleConfig<'a> for AwsConfig<'a> {
|
impl<'a> RootModuleConfig<'a> for AwsConfig<'a> {
|
||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
AwsConfig {
|
AwsConfig {
|
||||||
format: "on [$symbol$profile(\\($region\\))]($style) ",
|
format: "on [$symbol($profile )(\\($region\\) )]($style)",
|
||||||
symbol: "☁️ ",
|
symbol: "☁️ ",
|
||||||
style: "bold yellow",
|
style: "bold yellow",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
@ -208,7 +208,9 @@ mod tests {
|
|||||||
.collect();
|
.collect();
|
||||||
let expected = Some(format!(
|
let expected = Some(format!(
|
||||||
"on {}",
|
"on {}",
|
||||||
Color::Yellow.bold().paint("☁️ astronauts(ap-northeast-2)")
|
Color::Yellow
|
||||||
|
.bold()
|
||||||
|
.paint("☁️ astronauts (ap-northeast-2) ")
|
||||||
));
|
));
|
||||||
|
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
@ -282,7 +284,9 @@ region = us-east-2
|
|||||||
.collect();
|
.collect();
|
||||||
let expected = Some(format!(
|
let expected = Some(format!(
|
||||||
"on {}",
|
"on {}",
|
||||||
Color::Yellow.bold().paint("☁️ astronauts(ap-northeast-1)")
|
Color::Yellow
|
||||||
|
.bold()
|
||||||
|
.paint("☁️ astronauts (ap-northeast-1) ")
|
||||||
));
|
));
|
||||||
|
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
|
Loading…
Reference in New Issue
Block a user