From bc7bc74469ee5e412ae54c45ebaa5e07295323c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Wed, 29 Dec 2021 11:51:05 +0100 Subject: [PATCH] fix(git-prompt): fix clean prompt when stash is not empty (#9978) Fixes #9978 --- plugins/git-prompt/README.md | 8 ++++---- plugins/git-prompt/gitstatus.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/git-prompt/README.md b/plugins/git-prompt/README.md index c6610fa94..83d365c84 100644 --- a/plugins/git-prompt/README.md +++ b/plugins/git-prompt/README.md @@ -11,7 +11,8 @@ plugins=(... git-prompt) See the [original repository](https://github.com/olivierverdier/zsh-git-prompt). -## Prerequisites +## Requirements + This plugin uses `python`, so your host needs to have it installed ## Examples @@ -30,7 +31,7 @@ The prompt may look like the following: By default, the general appearance of the prompt is: -``` +```text (|) ``` @@ -58,9 +59,8 @@ The symbols are as follows: ## Customisation - Set the variable `ZSH_THEME_GIT_PROMPT_CACHE` to any value in order to enable caching. -- You may also change a number of variables (whose name start with `ZSH_THEME_GIT_PROMPT_`) +- You may also change a number of variables (whose name start with `ZSH_THEME_GIT_PROMPT_`) to change the appearance of the prompt. Take a look at the bottom of the [plugin file](git-prompt.plugin.zsh)` to see what variables are available. - **Enjoy!** diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index 786274a71..4dea8000f 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -81,7 +81,7 @@ for st in status: staged.append(st) stashed = get_stash() -if not changed and not staged and not conflicts and not untracked and not stashed: +if not changed and not staged and not conflicts and not untracked: clean = 1 else: clean = 0