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

git-prompt plugin doesn't display properly #9395

Closed
TyMick opened this issue Oct 28, 2020 · 2 comments
Closed

git-prompt plugin doesn't display properly #9395

TyMick opened this issue Oct 28, 2020 · 2 comments
Labels
Area: plugin Issue or PR related to a plugin Area: theme Issue or PR related to a theme Support Request for support

Comments

@TyMick
Copy link

TyMick commented Oct 28, 2020

Describe the bug

The git-prompt plugin isn't replacing my theme's default git prompt. Depending on the theme, it either adds an extra git-prompt prompt on the right side of the terminal (but missing a closing parethsesis) or it doesn't show up altogether.

After seeing #8936 (which this might be a duplicate of), I tried disabling the git plugin, but it turns out themes display git prompts independently of whether or not the git plugin is enabled. I also tried several different themes (that's robbyrussell and arrow in the screenshots below), but git-prompt didn't work with any of them.

To Reproduce

  1. Add git-plugin to the plugins array in .zshrc.
  2. exec zsh
  3. cd into any git repository.

Expected behavior

I should see a git prompt matching git-prompt's examples in the correct location for my theme.

Screenshots and/or Recordings

Screen Shot 2020-10-28 at 11 02 11 AM

Screen Shot 2020-10-28 at 11 14 22 AM

Desktop (please complete the following information):

  • OS / Distro: macOS 10.15.7 (19H2)
  • Latest ohmyzsh update?: Yes
  • ZSH Version: 5.7.1 (x86_64-apple-darwin19.0)
  • Terminal emulator: Mac Terminal, VSCodium

Additional context

Here's my .zshrc (excluding comments):

export ZSH="/Users/tymick/.oh-my-zsh"
ZSH_THEME="robbyrussell"
plugins=(
    alias-finder brew colored-man-pages command-not-found common-aliases
    copybuffer copydir copyfile git git-auto-fetch git-prompt safe-paste sudo
    vscode web-search
)
source $ZSH/oh-my-zsh.sh

And here's my .oh-my-zsh/custom: https://github.com/tywmick/ohmyzsh-custom

@jerome-benoit
Copy link
Contributor

jerome-benoit commented Apr 18, 2021

That's not an issue is fact. The plugin is meant to use RPROMPT by default. If you want to use the plugin prompt git helper, you have to write our own theme.

@mcornella
Copy link
Member

As noted by Jérôme, to use the plugin you need to customise your theme to use the git-prompt function instead. See the guide here.

@mcornella mcornella added Area: plugin Issue or PR related to a plugin Area: theme Issue or PR related to a theme Support Request for support labels Feb 1, 2022
robbyrussell pushed a commit that referenced this issue Apr 6, 2024
* Add note about need to customise theme.

It may not be obvious that the theme needs to be customised. See: #9395

* Clarify type of theme customisation needed.
lukaselmer pushed a commit to lukaselmer/ohmyzsh that referenced this issue Apr 16, 2024
* Add note about need to customise theme.

It may not be obvious that the theme needs to be customised. See: ohmyzsh#9395

* Clarify type of theme customisation needed.
cschuyle pushed a commit to cschuyle/ohmyzsh that referenced this issue Apr 18, 2024
* Add note about need to customise theme.

It may not be obvious that the theme needs to be customised. See: ohmyzsh#9395

* Clarify type of theme customisation needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin Area: theme Issue or PR related to a theme Support Request for support
Projects
Archived in project
Development

No branches or pull requests

3 participants