Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
5f893dcd
Commit
5f893dcd
authored
Mar 23, 2019
by
Marc Cornellà
Browse files
aws: clean up aws_change_access_key function
parent
4f4985fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/aws/aws.plugin.zsh
View file @
5f893dcd
...
...
@@ -15,18 +15,19 @@ function asp {
}
function
aws_change_access_key
{
if
[[
"x
$1
"
==
"x
"
]]
then
echo
"usage:
$0
<profile
.name
>"
if
[[
-z
"
$1
"
]]
then
echo
"usage:
$0
<profile>"
return
1
else
echo
"Insert the credentials when asked."
asp
$1
aws iam create-access-key
aws configure
--profile
$1
echo
"You can now safely delete the old access key running 'aws iam delete-access-key --access-key-id ID'"
echo
"Your current keys are:"
aws iam list-access-keys
fi
echo
Insert the credentials when asked.
asp
"
$1
"
aws iam create-access-key
aws configure
--profile
"
$1
"
echo
You can now safely delete the old access key running
\`
aws iam delete-access-key
--access-key-id
ID
\`
echo
Your current keys are:
aws iam list-access-keys
}
function
aws_profiles
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment