Merge pull request #622 from billmoritz/aws_profile_support
Add support for AWS Tools Profile.pull/624/head
commit
bab76a58b1
|
|
@ -188,9 +188,9 @@ function svn_prompt_vars {
|
|||
}
|
||||
|
||||
# this functions returns absolute location of .hg directory if one exists
|
||||
# It starts in the current directory and moves its way up until it hits /.
|
||||
# It starts in the current directory and moves its way up until it hits /.
|
||||
# If we get to / then no Mercurial repository was found.
|
||||
# Example:
|
||||
# Example:
|
||||
# - lets say we cd into ~/Projects/Foo/Bar
|
||||
# - .hg is located in ~/Projects/Foo/.hg
|
||||
# - get_hg_root starts at ~/Projects/Foo/Bar and sees that there is no .hg directory, so then it goes into ~/Projects/Foo
|
||||
|
|
@ -221,7 +221,7 @@ function hg_prompt_vars {
|
|||
HG_ROOT=$(get_hg_root)
|
||||
|
||||
if [ -f $HG_ROOT/branch ]; then
|
||||
# Mercurial holds it's current branch in .hg/branch file
|
||||
# Mercurial holds it's current branch in .hg/branch file
|
||||
SCM_BRANCH=$(cat $HG_ROOT/branch)
|
||||
else
|
||||
SCM_BRANCH=$(hg summary 2> /dev/null | grep branch: | awk '{print $2}')
|
||||
|
|
@ -352,3 +352,11 @@ if [ ! -e $BASH_IT/plugins/enabled/battery.plugin.bash ]; then
|
|||
echo -n
|
||||
}
|
||||
fi
|
||||
|
||||
function aws_profile {
|
||||
if [[ $AWS_DEFAULT_PROFILE ]]; then
|
||||
echo -e "${AWS_DEFAULT_PROFILE}"
|
||||
else
|
||||
echo -e "default"
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue