Explorar o código

zsh: use automatic gitstatusd if system one not present

Thomas Dy %!s(int64=4) %!d(string=hai) anos
pai
achega
5336b6452a
Modificáronse 2 ficheiros con 5 adicións e 2 borrados
  1. 4 1
      .zsh/p10k.zsh
  2. 1 1
      .zshrc

+ 4 - 1
.zsh/p10k.zsh

@@ -2,7 +2,10 @@ if [[ $__p9k_sourced != 13 ]]; then
   return
 fi
 __prompt_themed=true
-export GITSTATUS_DAEMON=$(which gitstatusd)
+
+if gitstatusd=$(which gitstatusd); then
+  export GITSTATUS_DAEMON="$gitstatusd"
+fi
 
 # Tip: Looking for a nice color? Here's a one-liner to print colormap.
 #

+ 1 - 1
.zshrc

@@ -8,7 +8,7 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
   source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
 fi
 
-zplug romkatv/powerlevel10k, as:theme, depth:1, if:"command -v gitstatusd"
+zplug romkatv/powerlevel10k, as:theme, depth:1
 zplug t413/zsh-background-notify
 zplug rimraf/k
 zplug tarrasch/zsh-bd