From dc70af567ed67e459a1683bd50ae16dedf307cc9 Mon Sep 17 00:00:00 2001 From: Kristian Rekstad Date: Wed, 18 Oct 2023 10:43:03 +0200 Subject: [PATCH] Use the new AWS_CREDENTIAL_EXPIRATION env var for aws-vault Fixes #350 --- 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 1ec90fd..4929d56 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"