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

Directory not recognized as git when automatically restoring paths #157

Open
itay-grudev opened this issue Mar 27, 2023 · 4 comments
Open

Comments

@itay-grudev
Copy link

itay-grudev commented Mar 27, 2023

Describe the bug
When my terminal is automatically restoring its path (using the last-working-dir plugin for example, none of the git information is displayed.

I also found another way to reproduce the issue - by making your home directory a git repository.

If you cd out and then back into the current directory everything works correctly, but not when you're already in it by default.

To Reproduce
Steps to reproduce the behavior:

  1. cd $HOME && git init
  2. Restart your terminal
  3. No git information is displayed

Expected behavior
I expect to see a git branch and a git status indicator.

@reobin
Copy link
Owner

reobin commented Mar 30, 2023

Hey @itay-grudev ! Thanks for reaching out.

Can you expand on automatically restoring terminal's path (using a plugin)? what would be the repro steps with that?

I have not reproduced the bug using git init in the $HOME directory on my side. What OS are you on, by curiosity?

@itay-grudev
Copy link
Author

itay-grudev commented Mar 30, 2023

@reobin Can you reproduce it with the following config. Maybe it's related to that:

typewritten_custom_right_prompt_prefix() {
  echo
}
export TYPEWRITTEN_RIGHT_PROMPT_PREFIX_FUNCTION=typewritten_custom_right_prompt_prefix

In my case when I use a prefix function sometimes the git information loads, some times it doesn't. Take a look at the screenshot below - all I am doing is pressing RETURN.

image

@reobin
Copy link
Owner

reobin commented Apr 3, 2023

I was not able to reproduce the behaviour you're getting :/

Instead of pressing enter repeatedly, could you try to run this command instead everytime? (the line that's used to get the branch name)

command git symbolic-ref --short -q HEAD

@itay-grudev
Copy link
Author

itay-grudev commented Apr 5, 2023

The moment I type that in - the information gets loaded. Here is a video.

Screencast.from.2023-04-05.13-02-12.webm

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

2 participants