Skip to content

Commit 3c66f64

Browse files
author
Jonathan Dahan
committed
Fix status setting as global
1 parent bf921b0 commit 3c66f64

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

geometry.zsh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,12 @@ add-zsh-hook precmd geometry::clear_title
5252

5353
# join outputs of functions - pwd first
5454
geometry::wrap() {
55-
GEOMETRY_LAST_STATUS="$status"
56-
setopt localoptions noautopushd; builtin cd -q $1
57-
local -a outputs
58-
local cmd output
59-
shift
60-
for cmd in $@; do output=$($cmd); (( $? )) || outputs+=$output; done
61-
echo "${(ps.${GEOMETRY_SEPARATOR}.)outputs}"
55+
setopt localoptions noautopushd; builtin cd -q $1
56+
local -a outputs
57+
local cmd output
58+
shift
59+
for cmd in $@; do output=$($cmd); (( $? )) || outputs+=$output; done
60+
echo "${(ps.${GEOMETRY_SEPARATOR}.)outputs}"
6261
}
6362

6463
geometry::rprompt::set() {
@@ -77,6 +76,7 @@ geometry::rprompt() {
7776
}
7877

7978
geometry::prompt() {
79+
GEOMETRY_LAST_STATUS="$status"
8080
PROMPT="$(geometry::wrap $PWD $GEOMETRY_PROMPT)$GEOMETRY_SEPARATOR"
8181
geometry::rprompt
8282
}

0 commit comments

Comments
 (0)