Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behavior when geometry_git is in GEOMETRY_PROMPT instead of GEOMETRY_RPROMPT #318

Open
simensen opened this issue Jun 4, 2024 · 1 comment

Comments

@simensen
Copy link

simensen commented Jun 4, 2024

Every time I enter a command, my prompt "redraws" in such a way that my prompt changes length. It is super distracting.

Even the wrapping spaces at the start and the end of the left prompt go from missing to "there".

For example, given the following prompt:

 # ~/ansible-playbooks bsimensen-master-patch-3744 ⬢ 

If I execute this command:

~/ansible-playbooks bsimensen-master-patch-3744 ⬢ grep -i geometry ~/.zshrc

ZSH_THEME="geometry/geometry"
export GEOMETRY_STATUS_SYMBOL="$"
export GEOMETRY_STATUS_SYMBOL_ERROR="$"
export GEOMETRY_STATUS_SYMBOL_ROOT="#"
export GEOMETRY_STATUS_SYMBOL_ROOT_ERROR="#"
export GEOMETRY_STATUS_COLOR=251
export GEOMETRY_PATH_COLOR=248
export GEOMETRY_HOSTNAME_HIDE_ON=BSIMENSEN1
export GEOMETRY_HOSTNAME_HIDE_USER_ON=bsimensen
export GEOMETRY_PROMPT=(geometry_status geometry_path geometry_git)
export GEOMETRY_RPROMPT=(geometry_exec_time geometry_hg geometry_echo)
export GEOMETRY_TITLE=(geometry_status geometry_hostname geometry_path)


... the prompt I see for a split second is as follows:

my-hostname bsimensen-master-patch-3744 ⬢


... until it settles here again:

~/ansible-playbooks bsimensen-master-patch-3744 ⬢


* System: Ubuntu 20.04.6 LTS
* Terminal: Windows Terminal Version: 1.19.11213.0
* Shell: zsh 5.8 (x86_64-ubuntu-linux-gnu)

<!-- starting with the following zshrc, can you reproduce the issue? -->
<!-- please share any modifications necessary -->

Using this as a test, I was able to debug the cause of my trouble:

```zsh
# ~/.zshrc
test -d ~/.geometry || git clone https://github.com/geometry-zsh/geometry.git ~/.geometry
source ~/.geometry/geometry.zsh

It appears that having geometry_git in my GEOMETRY_PROMPT was the issue:

export GEOMETRY_PROMPT=(geometry_status geometry_path geometry_git)

I used to use a gitprompt when I was using Minimal/MNML and never noticed this kind of issue. Is there something in geometry_git that can be tweaked/changed to not cause this behavior?

@simensen
Copy link
Author

simensen commented Jun 4, 2024

It looks like it does this if I use geometry_hostname in GEOMETRY_PROMPT as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant