mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-21 23:01:57 +00:00
Merge remotebranch 'dritter/dritter/aws_segment'
This commit is contained in:
commit
576f1c0309
2 changed files with 11 additions and 0 deletions
|
@ -64,6 +64,7 @@ currently available are:
|
||||||
* **rbenv** - Ruby environment information (if one is active).
|
* **rbenv** - Ruby environment information (if one is active).
|
||||||
* **status** - The return code of the previous command, and status of background jobs.
|
* **status** - The return code of the previous command, and status of background jobs.
|
||||||
* **history** - The command number for the current line.
|
* **history** - The command number for the current line.
|
||||||
|
* **aws** - The current AWS profile, if you exported it with `export AWS_DEFAULT_PROFILE=<profile_name>`
|
||||||
* **time** - System time.
|
* **time** - System time.
|
||||||
|
|
||||||
To specify which segments you want, just add the following variables to your
|
To specify which segments you want, just add the following variables to your
|
||||||
|
|
|
@ -270,6 +270,16 @@ prompt_rbenv() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# AWS Profile
|
||||||
|
# See http://docs.aws.amazon.com/cli/latest/userguide/installing.html
|
||||||
|
prompt_aws() {
|
||||||
|
local aws_profile=$AWS_DEFAULT_PROFILE
|
||||||
|
if [[ -n $aws_profile ]];
|
||||||
|
then
|
||||||
|
$1_prompt_segment red white "AWS: $aws_profile"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Main prompt
|
# Main prompt
|
||||||
build_left_prompt() {
|
build_left_prompt() {
|
||||||
if (( ${#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS} == 0 )); then
|
if (( ${#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS} == 0 )); then
|
||||||
|
|
Loading…
Reference in a new issue