1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-21 11:50:07 +00:00

Merge pull request #5 from natemccurdy/remove_whitespace

Remove the leading whitespace from the left prompt.
This commit is contained in:
Ben Hilburn 2015-03-26 15:52:07 -07:00
commit a825d76d15

View file

@ -52,9 +52,9 @@ left_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}%}$LEFT_SEGMENT_SEPARATOR%{$fg%} "
echo -n "%{$bg%F{$CURRENT_BG}%}$LEFT_SEGMENT_SEPARATOR%{$fg%} "
else
echo -n " %{$bg%}%{$fg%} "
echo -n "%{$bg%}%{$fg%} "
fi
CURRENT_BG=$1
[[ -n $3 ]] && echo -n $3