geometry-zsh / geometry

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

Custom git GEOMETRY_RPROMPT spews to stderr #295

Closed duncanbeevers closed 4 years ago

duncanbeevers commented 4 years ago

Describe the bug The meta-function geometry_git guards against non-git directories. Customizing GEOMETRY_RPROMPT with a limited set of geometry_git_* functions doesn't benefit from this guard so the prompt spews to stderr in non-git directories.

Including the complete set of geometry_git_* functions without the preamble guard provided by geometry_git is especially noisy.

To Reproduce Steps to reproduce the behavior:

  1. Customize .zshrc with export GEOMETRY_RPROMPT=(geometry_git_rebase)
  2. Open shell, navigate to non-git directory
  3. See error

Expected behavior No errors, no stderr output

Screenshots A single geometry_git_* function referenced 2020-06-10 at 1 46 PM

All default geometry_git_* functions referenced 2020-06-10 at 1 53 PM

Desktop (please complete the following information):