1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2026-01-11 04:53:09 +01:00

[Agnoster theme] Add the prompt view customization ability

This commit is contained in:
apodkutin
2018-10-28 00:36:31 +02:00
committed by Aleksandr Podkutin
parent 3848102a5e
commit 1ab87862ff

View File

@@ -29,6 +29,20 @@
# jobs are running in this shell will all be displayed automatically when
# appropriate.
### Segments of the prompt default order declaration
typeset -aHg AGNOSTER_PROMPT=(
prompt_status
prompt_virtualenv
prompt_aws
prompt_context
prompt_dir
prompt_git
prompt_bzr
prompt_hg
prompt_end
)
### Segment drawing
# A few utility functions to make it easy and re-usable to draw segmented prompts
@@ -239,15 +253,9 @@ prompt_aws() {
## Main prompt
build_prompt() {
RETVAL=$?
prompt_status
prompt_virtualenv
prompt_aws
prompt_context
prompt_dir
prompt_git
prompt_bzr
prompt_hg
prompt_end
for prompt_segment in "${AGNOSTER_PROMPT[@]}"; do
[[ -n $prompt_segment ]] && $prompt_segment
done
}
PROMPT='%{%f%b%k%}$(build_prompt) '