now usable by all prompts
This commit is contained in:
@@ -66,8 +66,8 @@ 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`
|
||||
* `user_info` - Current user
|
||||
* `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.
|
||||
* `shlvl` - Show the current shell level (based on `SHLVL` environment variable), but only if you are not in root shell
|
||||
|
||||
@@ -50,6 +50,15 @@ function __powerline_terraform_prompt() {
|
||||
fi
|
||||
}
|
||||
|
||||
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=""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user