From eb3ddadc6c6a99526925434c3ed4a48e3303c6cf Mon Sep 17 00:00:00 2001 From: romkatv Date: Tue, 11 Feb 2020 13:14:04 +0100 Subject: [PATCH] add POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' to config templates --- README.md | 15 +++++++++++++++ config/p10k-classic.zsh | 5 +++++ config/p10k-lean-8colors.zsh | 5 +++++ config/p10k-lean.zsh | 5 +++++ config/p10k-rainbow.zsh | 5 +++++ 5 files changed, 35 insertions(+) diff --git a/README.md b/README.md index bedafc67..f77b7534 100644 --- a/README.md +++ b/README.md @@ -732,6 +732,20 @@ source code. *Related*: [What do different symbols in Git status mean?]( #what-do-different-symbols-in-git-status-mean) +### Why is Git status from `$HOME/.git` not displayed in prompt? + +When using Lean, Classic or Rainbow style, `~/.p10k.zsh` contains the following parameter: + +```zsh +# Don't show Git status in prompt for repositories whose workdir matches this pattern. +# For example, if set to '~', the Git repository at $HOME/.git will be ignored. +# Multiple patterns can be combined with '|': '~|~/some/dir'. +typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' +``` + +To see Git status for `$HOME/.git` in prompt, open `~/.p10k.zsh` and remove +`POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN`. + ### How do I add username and/or hostname to prompt? When using Lean, Classic or Rainbow style, prompt shows `username@hostname` when you are logged in @@ -1445,6 +1459,7 @@ There are a few mitigation options for this issue. - [How do I enable instant prompt?](#how-do-i-enable-instant-prompt) - [What do different symbols in Git status mean?](#what-do-different-symbols-in-git-status-mean) - [How do I change the format of Git status?](#how-do-i-change-the-format-of-git-status) + - [Why is Git status from `$HOME/.git` not displayed in prompt?](#why-is-git-status-from-home-git-not-displayed-in-prompt) - [How do I add username and/or hostname to prompt?](#how-do-i-add-username-andor-hostname-to-prompt) - [Why some prompt segments appear and disappear as I'm typing?](#why-some-prompt-segments-appear-and-disappear-as-im-typing) - [How do I change prompt colors?](#how-do-i-change-prompt-colors) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 60a044a7..36de5ecf 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -453,6 +453,11 @@ # config: `git config bash.showDirtyState false`. typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 + # Don't show Git status in prompt for repositories whose workdir matches this pattern. + # For example, if set to '~', the Git repository at $HOME/.git will be ignored. + # Multiple patterns can be combined with '|': '~|~/some/dir'. + typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' + # Disable the default Git status formatting. typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true # Install our own Git status formatter. diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 0f8044be..e22bf712 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -454,6 +454,11 @@ # config: `git config bash.showDirtyState false`. typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 + # Don't show Git status in prompt for repositories whose workdir matches this pattern. + # For example, if set to '~', the Git repository at $HOME/.git will be ignored. + # Multiple patterns can be combined with '|': '~|~/some/dir'. + typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' + # Disable the default Git status formatting. typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true # Install our own Git status formatter. diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 334efc35..515f8604 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -454,6 +454,11 @@ # config: `git config bash.showDirtyState false`. typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 + # Don't show Git status in prompt for repositories whose workdir matches this pattern. + # For example, if set to '~', the Git repository at $HOME/.git will be ignored. + # Multiple patterns can be combined with '|': '~|~/some/dir'. + typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' + # Disable the default Git status formatting. typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true # Install our own Git status formatter. diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 3c86ed01..1088de91 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -457,6 +457,11 @@ # config: `git config bash.showDirtyState false`. typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 + # Don't show Git status in prompt for repositories whose workdir matches this pattern. + # For example, if set to '~', the Git repository at $HOME/.git will be ignored. + # Multiple patterns can be combined with '|': '~|~/some/dir'. + typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' + # Disable the default Git status formatting. typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true # Install our own Git status formatter.