From 2057080ec2849d94e2d07ccec9caab4fe1c00b59 Mon Sep 17 00:00:00 2001 From: romkatv Date: Wed, 30 Oct 2019 19:13:15 +0100 Subject: fix an error message printed for 32-bit intel users; see https://github.com/romkatv/gitstatus/issues/73 --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/p10k.zsh') diff --git a/internal/p10k.zsh b/internal/p10k.zsh index e2c65250..58ce5321 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -5192,7 +5192,7 @@ _p9k_init_vcs() { (( $_POWERLEVEL9K_VCS_BACKENDS[(I)git] )) || return local gitstatus_dir=${_POWERLEVEL9K_GITSTATUS_DIR:-${__p9k_root_dir}/gitstatus} - if [[ -z $GITSTATUS_DAEMON && $_p9k_uname == i686 && -z $gitstatus_dir/bin/*-i686(-static|)(#qN) ]]; then + if [[ -z $GITSTATUS_DAEMON && $_p9k_uname_m == i686 && -z $gitstatus_dir/bin/*-i686(-static|)(#qN) ]]; then _p9k__gitstatus_disabled=1 >&2 echo -E - "${(%):-[%1FERROR%f]: %BPowerlevel10k%b is unable to use %Bgitstatus%b. Git prompt will be slow.}" >&2 echo -E - "" -- cgit v1.2.3 From 99e632f97d23d1c3bc1d60c6c7d45be2ad644345 Mon Sep 17 00:00:00 2001 From: romkatv Date: Sat, 2 Nov 2019 10:42:01 +0100 Subject: add POWERLEVEL9K__DISABLED_DIR_PATTERN This parameter allows you to disable a given prompt segment in any directory that matches the specified pattern. For example, if you have a Git repository in /foo/bar for which you don't want to see Git status in prompt, define the following parameter: POWERLEVEL9K_VCS_DISABLED_DIR_PATTERN='/foo/bar(|/*)' See #300. --- internal/p10k.zsh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/p10k.zsh') diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 58ce5321..165e1eea 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3432,6 +3432,8 @@ function _p9k_set_iface() { function _p9k_build_segment() { _p9k_segment_name=${_p9k_segment_name%_joined} + local disabled=POWERLEVEL9K_${(U)_p9k_segment_name}_DISABLED_DIR_PATTERN + [[ $_p9k_pwd == ${(P)~disabled} ]] && return if [[ $_p9k_segment_name == custom_* ]]; then _p9k_custom_prompt $_p9k_segment_name[8,-1] elif (( $+functions[prompt_$_p9k_segment_name] )); then @@ -3442,6 +3444,8 @@ function _p9k_build_segment() { function _p9k_build_instant_segment() { _p9k_segment_name=${_p9k_segment_name%_joined} + local disabled=POWERLEVEL9K_${(U)_p9k_segment_name}_DISABLED_DIR_PATTERN + [[ $_p9k_pwd == ${(P)~disabled} ]] && return if (( $+functions[instant_prompt_$_p9k_segment_name] )); then local -i len=$#_p9k__prompt _p9k_non_hermetic_expansion=0 -- cgit v1.2.3 From 5d74fa39c8c6a89c92a7a31bdc213600fe12a1f4 Mon Sep 17 00:00:00 2001 From: romkatv Date: Mon, 4 Nov 2019 19:43:07 +0100 Subject: support msys --- internal/p10k.zsh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'internal/p10k.zsh') diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 165e1eea..163b257c 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -5234,7 +5234,13 @@ _p9k_init_vcs() { local daemon=${GITSTATUS_DAEMON} if [[ -z $daemon ]]; then daemon=$gitstatus_dir/bin/gitstatusd- - [[ $_p9k_uname_o == Android ]] && daemon+=android || daemon+=${_p9k_uname:l} + if [[ $_p9k_uname_o == Android ]]; then + daemon+=android + elif [[ $_p9k_uname == MSYS_NT-10.0-* ]]; then + daemon+=msys_nt-10.0 + else + daemon+=${_p9k_uname:l} + fi daemon+=-${_p9k_uname_m:l} fi local -i threads=${GITSTATUS_NUM_THREADS:-0} -- cgit v1.2.3 From ce2e14244371d19bb9f18a0cf364681abb0b75ae Mon Sep 17 00:00:00 2001 From: romkatv Date: Mon, 4 Nov 2019 20:13:35 +0100 Subject: use msys gitstatusd binary on mingw --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/p10k.zsh') diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 163b257c..0de24d95 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -5236,7 +5236,7 @@ _p9k_init_vcs() { daemon=$gitstatus_dir/bin/gitstatusd- if [[ $_p9k_uname_o == Android ]]; then daemon+=android - elif [[ $_p9k_uname == MSYS_NT-10.0-* ]]; then + elif [[ $_p9k_uname == (MINGW_64-10.0|MSYS_NT-10.0-*) ]]; then daemon+=msys_nt-10.0 else daemon+=${_p9k_uname:l} -- cgit v1.2.3