From 2ddb5051b088f4791127b137d4d6011e9108ad78 Mon Sep 17 00:00:00 2001 From: iyenigul Date: Wed, 29 Mar 2023 00:40:31 +0300 Subject: [PATCH] replace AWS_SESSION_EXPIRATION aws-vault 7.X removed AWS_SESSION_EXPIRATION env and replaced with AWS_CREDENTIAL_EXPIRATION to make this theme work for aws-vault 7.X, we must replace this env. see: https://github.com/99designs/aws-vault/pull/1143 --- functions/fish_prompt.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 21058ea..a534af5 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -660,13 +660,13 @@ function __bobthefish_prompt_aws_vault_profile -S -d 'Show AWS Vault profile' [ "$theme_display_aws_vault_profile" = 'yes' ] or return - [ -n "$AWS_VAULT" -a -n "$AWS_SESSION_EXPIRATION" ] + [ -n "$AWS_VAULT" -a -n "$AWS_CREDENTIAL_EXPIRATION" ] or return set -l profile $AWS_VAULT set -l now (date --utc +%s) - set -l expiry (date -d "$AWS_SESSION_EXPIRATION" +%s) + set -l expiry (date -d "$AWS_CREDENTIAL_EXPIRATION" +%s) set -l diff_mins (math "floor(( $expiry - $now ) / 60)") set -l diff_time $diff_mins"m"