prompt 'off'
fi
-#
-# Precmd
-#
-
-function prompt_precmd {
- git-info
-}
-
-#
-# Functions
-#
-
-function virtualenv_info {
- if [[ -z "$VIRTUAL_ENV" ]]; then
- venv="default"
- else
- venv="${VIRTUAL_ENV##*/}"
- fi
- echo "%{%F{green}%}py%{%F{black}%} ${venv}"
-}
-
-function rvm_info {
- if [[ -z "$RUBY_VERSION" ]]; then
- rvminfo="default"
- else
- rvminfo=`rvm-prompt`
- fi
- echo "%{%F{red}%}rb%{%F{black}%} ${rvminfo}"
-}
-
-function nvm_info {
- if [[ -z "$NVM_BIN" ]]; then
- nvminfo="default"
- else
- nvminfo=`nvm current`
- fi
- echo "%{%F{yellow}%}js%{%F{black}%} ${nvminfo}"
-}
-
-function box_name {
- [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
-}
-
#
# ZLE widgets
#
# Load required functions.
autoload -Uz add-zsh-hook
- # Add hook for calling git-info before each command.
- add-zsh-hook precmd prompt_precmd
-
- # Set git-info parameters.
- zstyle ':git:info' verbose 'no'
- zstyle ':git:info:branch' format '@%F{cyan}%b%f'
- zstyle ':git:info:clean' format ''
- zstyle ':git:info:added' format '%{%F{green}%}!'
- zstyle ':git:info:modified' format '%{%F{green}%}?'
- zstyle ':git:info:untracked' format '%{%F{magenta}%}?'
- zstyle ':git:info:keys' format \
- 'prompt' '%b%a%m%u'
-
# Define prompts.
PROMPT='
-%{%F{black}%}$(nvm_info) $(rvm_info) $(virtualenv_info)
-%{%F{magenta}%}%n%{%f%}@%{%F{yellow}%}$(box_name)%{%f%} %{%B%F{green}%}${PWD/#$HOME/~}%{%f%b%}${git_info[prompt]} %{%f%}
-%(?,,%{${%B%F{white}%}[%?]%{%f%b%} )$ '
+%{%F{black}%}$(env_info) $(node_info) $(rust_info) $(python_info)
+%{%F{magenta}%}%n%{%f%}@%{%F{yellow}%}$(hostname -s)%{%f%} %{%B%F{green}%}${PWD/#$HOME/~}%{%f%b%}$(git_info)%{%f%}
+%(?,,%{${%B%F{white}%}[%?]%{%f%b%} )%% '
}
prompt_setup "$@"