commit
fbeb6344fa
|
|
@ -155,6 +155,14 @@ function scm_prompt_info_common {
|
|||
{ [[ ${SCM} == ${SCM_SVN} ]] && svn_prompt_info && return; } || true
|
||||
}
|
||||
|
||||
function terraform_workspace_prompt {
|
||||
if _command_exists terraform ; then
|
||||
if [ -d .terraform ]; then
|
||||
echo -e "$(terraform workspace show 2>/dev/null)"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function git_prompt_minimal_info {
|
||||
SCM_STATE=${SCM_THEME_PROMPT_CLEAN}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,12 +60,14 @@ The contents of both prompt sides can be "reordered", all the "segments" (every
|
|||
* `cwd` - Current working directory including full folder hierarchy (c.f. `wd`)
|
||||
* `hostname` - Host name of machine
|
||||
* `in_vim` - Show identifier if running in `:terminal` from vim
|
||||
* `k8s_context` - Show current kubernetes context
|
||||
* `last_status` - Exit status of last run command
|
||||
* `python_venv` - Python virtual environment information (`virtualenv`, `venv`
|
||||
and `conda` supported)
|
||||
* `ruby` - Current ruby version if using `rvm`
|
||||
* `node` - Current node version (only `nvm` is supported)
|
||||
* `scm` - Version control information, `git`
|
||||
* `terraform` - Current terraform workspace
|
||||
* `user_info` - Current user
|
||||
* `wd` - Working directory, like `cwd` but doesn't show the full folder
|
||||
hierarchy, only the directory you're currently in.
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@ RBENV_THEME_PROMPT_SUFFIX=""
|
|||
RUBY_THEME_PROMPT_COLOR=${POWERLINE_RUBY_COLOR:=161}
|
||||
RUBY_CHAR=${POWERLINE_RUBY_CHAR:="❲r❳ "}
|
||||
|
||||
TERRAFORM_THEME_PROMPT_COLOR=${POWERLINE_TERRAFORM_COLOR:=161}
|
||||
TERRAFORM_CHAR=${POWERLINE_TERRAFORM_CHAR:="❲t❳ "}
|
||||
|
||||
KUBERNETES_CONTEXT_THEME_CHAR=${POWERLINE_KUBERNETES_CONTEXT_CHAR:="⎈ "}
|
||||
KUBERNETES_CONTEXT_THEME_PROMPT_COLOR=${POWERLINE_KUBERNETES_CONTEXT_COLOR:=26}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ The contents of the prompt can be "reordered", all the "segments" (every piece o
|
|||
* `ruby` - Current ruby version if using `rvm`
|
||||
* `node` - Current node version (only `nvm` is supported)
|
||||
* `scm` - Version control information, `git`
|
||||
* `terraform` - Current terraform workspace
|
||||
* `user_info` - Current user
|
||||
* `wd` - Working directory, like `cwd` but doesn't show the full folder
|
||||
hierarchy, only the directory you're currently in.
|
||||
|
|
|
|||
|
|
@ -44,6 +44,9 @@ RBENV_THEME_PROMPT_SUFFIX=""
|
|||
RUBY_THEME_PROMPT_COLOR=${POWERLINE_RUBY_COLOR:=161}
|
||||
RUBY_CHAR=${POWERLINE_RUBY_CHAR:="❲r❳ "}
|
||||
|
||||
TERRAFORM_THEME_PROMPT_COLOR=${POWERLINE_TERRAFORM_COLOR:=161}
|
||||
TERRAFORM_CHAR=${POWERLINE_TERRAFORM_CHAR:="❲t❳ "}
|
||||
|
||||
KUBERNETES_CONTEXT_THEME_CHAR=${POWERLINE_KUBERNETES_CONTEXT_CHAR:="⎈ "}
|
||||
KUBERNETES_CONTEXT_THEME_PROMPT_COLOR=${POWERLINE_KUBERNETES_CONTEXT_COLOR:=26}
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ The contents of the prompt can be "reordered", all the "segments" (every piece o
|
|||
* `ruby` - Current ruby version if using `rvm`
|
||||
* `node` - Current node version (only `nvm` is supported)
|
||||
* `scm` - Version control information, `git`
|
||||
* `terraform` - Current terraform workspace
|
||||
* `user_info` - Current user
|
||||
* `wd` - Working directory, like `cwd` but doesn't show the full folder
|
||||
hierarchy, only the directory you're currently in.
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@ RBENV_THEME_PROMPT_SUFFIX=""
|
|||
RUBY_THEME_PROMPT_COLOR=${POWERLINE_RUBY_COLOR:=161}
|
||||
RUBY_CHAR=${POWERLINE_RUBY_CHAR:="💎 "}
|
||||
|
||||
TERRAFORM_THEME_PROMPT_COLOR=${POWERLINE_TERRAFORM_COLOR:=161}
|
||||
TERRAFORM_CHAR=${POWERLINE_TERRAFORM_CHAR:="❲t❳ "}
|
||||
|
||||
KUBERNETES_CONTEXT_THEME_CHAR=${POWERLINE_KUBERNETES_CONTEXT_CHAR:="⎈ "}
|
||||
KUBERNETES_CONTEXT_THEME_PROMPT_COLOR=${POWERLINE_KUBERNETES_CONTEXT_COLOR:=26}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ The contents of the prompt can be "reordered", all the "segments" (every piece o
|
|||
* `ruby` - Current ruby version if using `rvm`
|
||||
* `node` - Current node version (only `nvm` is supported)
|
||||
* `scm` - Version control information, `git`
|
||||
* `terraform` - Current terraform workspace
|
||||
* `user_info` - Current user
|
||||
* `wd` - Working directory, like `cwd` but doesn't show the full folder
|
||||
hierarchy, only the directory you're currently in.
|
||||
|
|
|
|||
|
|
@ -41,6 +41,15 @@ function __powerline_user_info_prompt {
|
|||
[[ -n "${user_info}" ]] && echo "${user_info}|${color}"
|
||||
}
|
||||
|
||||
function __powerline_terraform_prompt {
|
||||
local terraform_workspace=""
|
||||
|
||||
if [ -d .terraform ]; then
|
||||
terraform_workspace="$(terraform_workspace_prompt)"
|
||||
[[ -n "${terraform_workspace}" ]] && echo "${TERRAFORM_CHAR}${terraform_workspace}|${TERRAFORM_THEME_PROMPT_COLOR}"
|
||||
fi
|
||||
}
|
||||
|
||||
function __powerline_node_prompt {
|
||||
local node_version=""
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,9 @@ RBENV_THEME_PROMPT_SUFFIX=""
|
|||
RUBY_THEME_PROMPT_COLOR=${POWERLINE_RUBY_COLOR:=161}
|
||||
RUBY_CHAR=${POWERLINE_RUBY_CHAR:="❲r❳ "}
|
||||
|
||||
TERRAFORM_THEME_PROMPT_COLOR=${POWERLINE_TERRAFORM_COLOR:=161}
|
||||
TERRAFORM_CHAR=${POWERLINE_TERRAFORM_CHAR:="❲t❳ "}
|
||||
|
||||
KUBERNETES_CONTEXT_THEME_CHAR=${POWERLINE_KUBERNETES_CONTEXT_CHAR:="⎈ "}
|
||||
KUBERNETES_CONTEXT_THEME_PROMPT_COLOR=${POWERLINE_KUBERNETES_CONTEXT_COLOR:=26}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue