Преглед на файлове

zsh: use automatic gitstatusd if system one not present

Thomas Dy преди 4 години
родител
ревизия
5336b6452a
променени са 2 файла, в които са добавени 5 реда и са изтрити 2 реда
  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