Skip to content

Commit 639b64d

Browse files
author
jedahan
committed
Clear the right prompt before we evaluate it, this fixes first terminal startup RPROMPT
1 parent ed7eaf1 commit 639b64d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

geometry.zsh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,18 @@ geometry::rprompt::set() {
106106

107107
geometry::rprompt() {
108108
typeset -g GEOMETRY_ASYNC_FD=
109+
RPROMPT=
109110
exec {GEOMETRY_ASYNC_FD}< <(geometry::wrap $PWD $GEOMETRY_RPROMPT)
110111
zle -F "$GEOMETRY_ASYNC_FD" geometry::rprompt::set
111112
}
112113

113114
geometry::prompt() {
114115
GEOMETRY[LAST_STATUS]="$status"
115116
PROMPT=" $(geometry::wrap $PWD $GEOMETRY_PROMPT) "
116-
geometry::rprompt
117117
}
118118

119119
add-zsh-hook precmd geometry::prompt
120+
add-zsh-hook precmd geometry::rprompt
120121

121122
geometry::info() { # draw info if no command is given
122123
[[ -n "$BUFFER" ]] && { zle accept-line && return; }

0 commit comments

Comments
 (0)