Skip to content

Commit 48a14e4

Browse files
author
Jonathan Dahan
committed
Read GEOMETRY_SEPARATOR dynamically
1 parent aa2a79b commit 48a14e4

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
The format is based on [Keep a Changelog](http://keepachangelog.com/)
44
and this project adheres to [Semantic Versioning](http://semver.org/).
55

6+
## 2.0.4 - 2019-10-14
7+
8+
### Fixed
9+
- Breaking GEOMETRY_SEPARATOR, especially on left prompt (thanks @diogoazevedos!)
10+
- Respond to changes in GEOMETRY_SEPARATOR dynamically
11+
612
## 2.0.3 - 2019-10-11
713

814
### Added

geometry.zsh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
typeset -gA GEOMETRY
88
GEOMETRY[ROOT]=${0:A:h}
9-
: ${GEOMETRY_SEPARATOR:=" "}
109

1110
(($+GEOMETRY_PROMPT)) || GEOMETRY_PROMPT=(geometry_echo geometry_status geometry_path)
1211
(($+GEOMETRY_RPROMPT)) || GEOMETRY_RPROMPT=(geometry_exec_time geometry_git geometry_hg geometry_echo)
@@ -58,7 +57,8 @@ geometry::wrap() {
5857
local cmd output
5958
shift
6059
for cmd in $@; do output=$($cmd); (( $? )) || outputs+=$output; done
61-
echo "${(ps.${GEOMETRY_SEPARATOR}.)outputs}"
60+
61+
echo "${(ej.${GEOMETRY_SEPARATOR:- }.)outputs}"
6262
}
6363

6464
geometry::rprompt::set() {
@@ -78,7 +78,7 @@ geometry::rprompt() {
7878

7979
geometry::prompt() {
8080
GEOMETRY[LAST_STATUS]="$status"
81-
PROMPT="$(geometry::wrap $PWD $GEOMETRY_PROMPT)$GEOMETRY_SEPARATOR"
81+
PROMPT="$(geometry::wrap $PWD $GEOMETRY_PROMPT) "
8282
geometry::rprompt
8383
}
8484

0 commit comments

Comments
 (0)