Fix zsh auto-complete PROMPT spacing issue
This commit is contained in:
parent
848a7ee4ed
commit
f9705de475
|
@ -42,7 +42,7 @@ esac
|
|||
# Special Powerline characters
|
||||
|
||||
() {
|
||||
local LC_ALL="" LC_CTYPE="en_US.UTF-8"
|
||||
local LC_ALL="en_US.utf8" LC_CTYPE="en_US.utf8"
|
||||
# NOTE: This segment separator character is correct. In 2012, Powerline changed
|
||||
# the code points they use for their special characters. This is the new code point.
|
||||
# If this is not working for you, you probably have an old version of the
|
||||
|
@ -64,9 +64,9 @@ prompt_segment() {
|
|||
[[ -n $1 ]] && bg="%K{$1}" || bg="%k"
|
||||
[[ -n $2 ]] && fg="%F{$2}" || fg="%f"
|
||||
if [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then
|
||||
echo -n "%{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} "
|
||||
echo -n "%{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%}"
|
||||
else
|
||||
echo -n "%{$bg%}%{$fg%} "
|
||||
echo -n "%{$bg%}%{$fg%}"
|
||||
fi
|
||||
CURRENT_BG=$1
|
||||
[[ -n $3 ]] && echo -n $3
|
||||
|
@ -87,7 +87,7 @@ prompt_context() {
|
|||
prompt_segment
|
||||
|
||||
#printf to kill the mystery space...?
|
||||
printf "\b%s" "%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}%b"
|
||||
echo -n "%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}%b"
|
||||
}
|
||||
|
||||
# Git: branch/detached head, dirty status
|
||||
|
|
Loading…
Reference in New Issue