geometry-zsh / geometry

geometry is a minimal, fully customizable and composable zsh prompt theme
ISC License
921 stars 94 forks source link

Refactor geometry_git_symbol into geometry_git #293

Closed Konsonanz closed 4 years ago

Konsonanz commented 4 years ago

Description

This PR refactors the geometry_git_symbol() function into the main geometry_git() function().

With the recent refactoring of printing function-output with geometry::wrap(), the array-joining in geometry_git_symbol() is now un-needed. The call to sub-functions should therefore be included in the main-function.

To-fix

The current behaviour of geometry_git_symbol() would always insert one un-needed space if only one of the called sub-functions is called. Using geometry::wrap() fixes that (please note the spacing around the "remote"-icon): demo I also took a look into the other functions, but found no oppurtunitys where this could also be done (I guess geometry_git_symbol() was just accidentally missed in the previous refactoring).

jedahan commented 4 years ago

Awesome, thank you!