mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
Merge pull request #12 from MichaelAnckaert/aws-plugin
First version of AWS plugin
This commit is contained in:
20
plugins/aws/aws.plugin.sh
Normal file
20
plugins/aws/aws.plugin.sh
Normal file
@ -0,0 +1,20 @@
|
||||
# aws.plugin.sh
|
||||
# Author: Michael Anckaert <michael.anckaert@sinax.be>
|
||||
# Based on oh-my-zsh AWS plugin
|
||||
#
|
||||
# command 'agp' returns the selected AWS profile (aws get profile)
|
||||
# command 'asp' sets the AWS profile to use (aws set profile)
|
||||
#
|
||||
|
||||
export AWS_HOME=~/.aws
|
||||
|
||||
function agp {
|
||||
echo $AWS_DEFAULT_PROFILE
|
||||
}
|
||||
|
||||
function asp {
|
||||
local rprompt=${RPROMPT/<aws:$(agp)>/}
|
||||
|
||||
export AWS_DEFAULT_PROFILE=$1
|
||||
export AWS_PROFILE=$1
|
||||
}
|
Reference in New Issue
Block a user