mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-23 02:35:38 +01:00
Merge 8b9ab37042 into f6a7bbf81a
This commit is contained in:
commit
fe2d6a61dc
1 changed files with 17 additions and 9 deletions
|
|
@ -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_SEGMENTS=(
|
||||
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
|
||||
|
||||
|
|
@ -353,15 +367,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_SEGMENTS[@]}"; do
|
||||
[[ -n $prompt_segment ]] && $prompt_segment
|
||||
done
|
||||
}
|
||||
|
||||
PROMPT='%{%f%b%k%}$(build_prompt) '
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue