Add support for AWS Tools Profile.
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.htmlpull/622/head
parent
725e1b2f76
commit
b967674e6c
|
|
@ -188,9 +188,9 @@ function svn_prompt_vars {
|
||||||
}
|
}
|
||||||
|
|
||||||
# this functions returns absolute location of .hg directory if one exists
|
# 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.
|
# If we get to / then no Mercurial repository was found.
|
||||||
# Example:
|
# Example:
|
||||||
# - lets say we cd into ~/Projects/Foo/Bar
|
# - lets say we cd into ~/Projects/Foo/Bar
|
||||||
# - .hg is located in ~/Projects/Foo/.hg
|
# - .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
|
# - 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)
|
HG_ROOT=$(get_hg_root)
|
||||||
|
|
||||||
if [ -f $HG_ROOT/branch ]; then
|
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)
|
SCM_BRANCH=$(cat $HG_ROOT/branch)
|
||||||
else
|
else
|
||||||
SCM_BRANCH=$(hg summary 2> /dev/null | grep branch: | awk '{print $2}')
|
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
|
echo -n
|
||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
function aws_profile {
|
||||||
|
if [[ $AWS_DEFAULT_PROFILE ]]; then
|
||||||
|
echo -e "${AWS_DEFAULT_PROFILE}"
|
||||||
|
else
|
||||||
|
echo -e "default"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue