From 8600374371f91843064441113f4023cda1730877 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sat, 18 Mar 2023 16:40:57 -0300 Subject: General fish fixes and updates --- .config/fish/functions/_tide_item_aws.fish | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .config/fish/functions/_tide_item_aws.fish (limited to '.config/fish/functions/_tide_item_aws.fish') diff --git a/.config/fish/functions/_tide_item_aws.fish b/.config/fish/functions/_tide_item_aws.fish new file mode 100644 index 00000000..7cb6338e --- /dev/null +++ b/.config/fish/functions/_tide_item_aws.fish @@ -0,0 +1,11 @@ +function _tide_item_aws + # AWS_PROFILE overrides AWS_DEFAULT_PROFILE, AWS_REGION overrides AWS_DEFAULT_REGION + set -q AWS_PROFILE && set -l AWS_DEFAULT_PROFILE $AWS_PROFILE + set -q AWS_REGION && set -l AWS_DEFAULT_REGION $AWS_REGION + + if test -n "$AWS_DEFAULT_PROFILE" && test -n "$AWS_DEFAULT_REGION" + _tide_print_item aws $tide_aws_icon' ' "$AWS_DEFAULT_PROFILE/$AWS_DEFAULT_REGION" + else if test -n "$AWS_DEFAULT_PROFILE$AWS_DEFAULT_REGION" + _tide_print_item aws $tide_aws_icon' ' "$AWS_DEFAULT_PROFILE$AWS_DEFAULT_REGION" + end +end -- cgit v1.2.3