From 8bd63f012cacab37dc33de07eb41c36024c96872 Mon Sep 17 00:00:00 2001 From: reonokiy Date: Thu, 20 Mar 2025 17:38:10 +0800 Subject: [PATCH] update aws --- dot_config/fish/functions/fish_aws_profile.fish | 11 +++++++++++ dot_config/starship.toml.tmpl | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 dot_config/fish/functions/fish_aws_profile.fish diff --git a/dot_config/fish/functions/fish_aws_profile.fish b/dot_config/fish/functions/fish_aws_profile.fish new file mode 100644 index 0000000..2b0ee1f --- /dev/null +++ b/dot_config/fish/functions/fish_aws_profile.fish @@ -0,0 +1,11 @@ +function fish_aws_profile + if test (count $argv) -eq 0 + set -e AWS_PROFILE + echo "AWS profile cleared" + return 0 + end + + set -gx AWS_PROFILE $argv[1] + echo "AWS profile set to $AWS_PROFILE" +end + diff --git a/dot_config/starship.toml.tmpl b/dot_config/starship.toml.tmpl index 72d822e..cd516d5 100644 --- a/dot_config/starship.toml.tmpl +++ b/dot_config/starship.toml.tmpl @@ -18,3 +18,13 @@ disabled = false [container] disabled = true {{ end }} + + +[aws] +format = 'on [$symbol($profile )(\($region\) )]($style)' +style = 'bold blue' +symbol = '🅰 ' +[aws.region_aliases] +ap-east-1 = 'hk' +ap-southeast-1 = 'sg' +ap-northeast-1 = 'tokyo'