From 71ebee2a9662825f3d780192c8d2d3c7a8fa374a Mon Sep 17 00:00:00 2001 From: Eduardo Bellido Bellido Date: Sun, 10 May 2015 23:50:18 +0200 Subject: [PATCH] Added remove option --- plugins/available/aws.plugin.bash | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/available/aws.plugin.bash b/plugins/available/aws.plugin.bash index fa194077..d434f876 100644 --- a/plugins/available/aws.plugin.bash +++ b/plugins/available/aws.plugin.bash @@ -6,6 +6,8 @@ function awskeys { group 'aws' if [[ $# -eq 1 ]] && [[ "$1" = "list" ]]; then __awskeys_list "$2" + elif [[ $# -eq 1 ]] && [[ "$1" = "remove" ]]; then + __awskeys_remove "$2" elif [[ $# -eq 2 ]] && [[ "$1" = "show" ]]; then __awskeys_show "$2" elif [[ $# -eq 2 ]] && [[ "$1" = "export" ]]; then @@ -23,6 +25,7 @@ function __awskeys_help { echo " list List available AWS credentials profiles" echo " show Show the AWS keys associated to a credentials profile" echo " export Export an AWS credentials profile keys as environment variables" + echo " remove Remove the AWS keys variables from the environment" } function __awskeys_get { @@ -67,3 +70,8 @@ function __awskeys_export { fi } +function __awskeys_remove { + unset AWS_DEFAULT_PROFILE + unset AWS_ACCESS_KEY_ID + unset AWS_SECRET_ACCESS_KEY +}