From 444e715766c4a8b267dba82f3f0f562584d61adc Mon Sep 17 00:00:00 2001 From: rogarb <69053978+rogarb@users.noreply.github.com> Date: Mon, 22 May 2023 10:49:10 +0000 Subject: feat(bureau): ignore hidden git repos (#11707) The git_prompt_info() function in lib/git.zsh ignores git repos which contains a specific config key, allowing to effectively "hide" them from the prompt. Unfortunately, the bureau theme doesn't use the library function to build its prompt. This commit modifies the specific prompt generation function in the bureau theme in order to achieve the same behaviour. --- themes/bureau.zsh-theme | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'themes/bureau.zsh-theme') diff --git a/themes/bureau.zsh-theme b/themes/bureau.zsh-theme index 698aa2ff8..9943a0c8c 100644 --- a/themes/bureau.zsh-theme +++ b/themes/bureau.zsh-theme @@ -67,6 +67,12 @@ bureau_git_status() { } bureau_git_prompt() { + # ignore non git folders and hidden repos (adapted from lib/git.zsh) + if ! command git rev-parse --git-dir &> /dev/null \ + || [[ "$(command git config --get oh-my-zsh.hide-info 2>/dev/null)" == 1 ]]; then + return + fi + # check git information local gitinfo=$(bureau_git_info) if [[ -z "$gitinfo" ]]; then -- cgit v1.2.3-70-g09d2 From ec369bb38e873fa2e8954bc45bc192fdb0051313 Mon Sep 17 00:00:00 2001 From: rogarb <69053978+rogarb@users.noreply.github.com> Date: Wed, 24 May 2023 12:32:26 +0000 Subject: fix(bureau): properly display git stash info (#11711) --- themes/bureau.zsh-theme | 1 + 1 file changed, 1 insertion(+) (limited to 'themes/bureau.zsh-theme') diff --git a/themes/bureau.zsh-theme b/themes/bureau.zsh-theme index 9943a0c8c..e87a594cd 100644 --- a/themes/bureau.zsh-theme +++ b/themes/bureau.zsh-theme @@ -15,6 +15,7 @@ ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[magenta]%}▾%{$reset_color%}" ZSH_THEME_GIT_PROMPT_STAGED="%{$fg_bold[green]%}●%{$reset_color%}" ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg_bold[yellow]%}●%{$reset_color%}" ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[red]%}●%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_STASHED="(%{$fg_bold[blue]%}✹%{$reset_color%})" bureau_git_info () { local ref -- cgit v1.2.3-70-g09d2