abra zsh config 2.0
This commit is contained in:
1
.zprezto/modules/prompt/external/agnoster/.git_backup
vendored
Normal file
1
.zprezto/modules/prompt/external/agnoster/.git_backup
vendored
Normal file
@@ -0,0 +1 @@
|
||||
gitdir: ../../../../.git/modules/modules/prompt/external/agnoster
|
@@ -26,7 +26,9 @@
|
||||
# A few utility functions to make it easy and re-usable to draw segmented prompts
|
||||
|
||||
CURRENT_BG='NONE'
|
||||
PRIMARY_FG=black
|
||||
if [[ -z "$PRIMARY_FG" ]]; then
|
||||
PRIMARY_FG=black
|
||||
fi
|
||||
|
||||
# Characters
|
||||
SEGMENT_SEPARATOR="\ue0b0"
|
||||
@@ -97,7 +99,7 @@ prompt_git() {
|
||||
ref="$DETACHED ${ref/.../}"
|
||||
fi
|
||||
prompt_segment $color $PRIMARY_FG
|
||||
print -Pn " $ref"
|
||||
print -n " $ref"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -120,12 +122,22 @@ prompt_status() {
|
||||
[[ -n "$symbols" ]] && prompt_segment $PRIMARY_FG default " $symbols "
|
||||
}
|
||||
|
||||
# Display current virtual environment
|
||||
prompt_virtualenv() {
|
||||
if [[ -n $VIRTUAL_ENV ]]; then
|
||||
color=cyan
|
||||
prompt_segment $color $PRIMARY_FG
|
||||
print -Pn " $(basename $VIRTUAL_ENV) "
|
||||
fi
|
||||
}
|
||||
|
||||
## Main prompt
|
||||
prompt_agnoster_main() {
|
||||
RETVAL=$?
|
||||
CURRENT_BG='NONE'
|
||||
prompt_status
|
||||
prompt_context
|
||||
prompt_virtualenv
|
||||
prompt_dir
|
||||
prompt_git
|
||||
prompt_end
|
||||
|
Reference in New Issue
Block a user