Merge pull request #230 from sabricot/docker_machine

Add a new segment for current active docker machine
pull/22/head
Ben Hilburn 9 years ago
commit 2d3131fb8a

@ -126,6 +126,7 @@ The segments that are currently available are:
* **AWS Segments:** * **AWS Segments:**
* [`aws`](#aws) - The current AWS profile, if active. * [`aws`](#aws) - The current AWS profile, if active.
* `aws_eb_env` - The current Elastic Beanstalk Environment. * `aws_eb_env` - The current Elastic Beanstalk Environment.
* `docker_machine` - The current Docker Machine.
**Other:** **Other:**
* [`custom_command`](#custom_command) - Create a custom segment to display the * [`custom_command`](#custom_command) - Create a custom segment to display the

@ -51,6 +51,7 @@ case $POWERLEVEL9K_MODE in
LOAD_ICON $'\UE190 ' #  LOAD_ICON $'\UE190 ' # 
SWAP_ICON $'\UE87D' #  SWAP_ICON $'\UE87D' # 
RAM_ICON $'\UE1E2 ' #  RAM_ICON $'\UE1E2 ' # 
SERVER_ICON $'\UE895' # 
VCS_UNTRACKED_ICON $'\UE16C' #  VCS_UNTRACKED_ICON $'\UE16C' # 
VCS_UNSTAGED_ICON $'\UE17C' #  VCS_UNSTAGED_ICON $'\UE17C' # 
VCS_STAGED_ICON $'\UE168' #  VCS_STAGED_ICON $'\UE168' # 
@ -105,6 +106,7 @@ case $POWERLEVEL9K_MODE in
LOAD_ICON $'\UF080 ' #  LOAD_ICON $'\UF080 ' # 
SWAP_ICON $'\UF0E4' #  SWAP_ICON $'\UF0E4' # 
RAM_ICON $'\UF0E4' #  RAM_ICON $'\UF0E4' # 
SERVER_ICON $'\UF296' # 
VCS_UNTRACKED_ICON $'\UF059' #  VCS_UNTRACKED_ICON $'\UF059' # 
VCS_UNSTAGED_ICON $'\UF06A' #  VCS_UNSTAGED_ICON $'\UF06A' # 
VCS_STAGED_ICON $'\UF055' #  VCS_STAGED_ICON $'\UF055' # 
@ -155,6 +157,7 @@ case $POWERLEVEL9K_MODE in
LOAD_ICON 'L' LOAD_ICON 'L'
SWAP_ICON 'SWP' SWAP_ICON 'SWP'
RAM_ICON 'RAM' RAM_ICON 'RAM'
SERVER_ICON ''
VCS_UNTRACKED_ICON '?' VCS_UNTRACKED_ICON '?'
VCS_UNSTAGED_ICON $'\u25CF' # ● VCS_UNSTAGED_ICON $'\u25CF' # ●
VCS_STAGED_ICON $'\u271A' # ✚ VCS_STAGED_ICON $'\u271A' # ✚

@ -463,6 +463,15 @@ prompt_dir() {
fi fi
} }
# Docker machine
prompt_docker_machine() {
local docker_machine="$DOCKER_MACHINE_NAME"
if [[ -n "$docker_machine" ]]; then
"$1_prompt_segment" "$0" "$2" "magenta" "$DEFAULT_COLOR" "$docker_machine" 'SERVER_ICON'
fi
}
# GO prompt # GO prompt
prompt_go_version() { prompt_go_version() {
local go_version local go_version

Loading…
Cancel
Save