Skip to content

Commit d78d0da

Browse files
author
Jonathan Dahan
committed
fix left and right prompt spacing issues, thanks @Konsonanz
1 parent 7c0d6e4 commit d78d0da

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
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.2.0 - 2020-01-13
7+
8+
### Fixed
9+
- Prepended space for left prompt (thanks @Konsonanz!)
10+
- Hide extra spaces due to functions that have nothing to show (thanks @Konsonanz!)
11+
612
## 2.1.0 - 2019-12-27
713

814
### Improved

geometry.zsh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ geometry::wrap() {
7373
local -a outputs
7474
local cmd output
7575
shift
76-
for cmd in $@; do output=$($cmd); (( $? )) || outputs+=$output; done
76+
for cmd in $@; do output=$($cmd); ( (( $? )) || [[ -z "${output// }" ]] ) || outputs+=$output; done
7777

7878
echo "${(ej.${GEOMETRY_SEPARATOR:- }.)outputs}"
7979
}
@@ -95,7 +95,7 @@ geometry::rprompt() {
9595

9696
geometry::prompt() {
9797
GEOMETRY[LAST_STATUS]="$status"
98-
PROMPT="$(geometry::wrap $PWD $GEOMETRY_PROMPT) "
98+
PROMPT=" $(geometry::wrap $PWD $GEOMETRY_PROMPT) "
9999
geometry::rprompt
100100
}
101101

0 commit comments

Comments
 (0)