diff options
| author | Christoph Schlosser <christoph@linux.com> | 2025-06-19 01:05:05 +0200 |
|---|---|---|
| committer | Christoph Schlosser <christoph@linux.com> | 2025-06-19 01:05:05 +0200 |
| commit | d2c62d9299f647ae271f197915d3105067362b0a (patch) | |
| tree | d2a583351d0cc82f3ecc0c911a911f1d6203f35a /conf.d | |
| parent | 60bdec79fe26a300cc2b1701652ebcf8bfc9194a (diff) | |
| download | c-star-d2c62d9299f647ae271f197915d3105067362b0a.tar.gz | |
Indicate that git status is loading and don't shot git at all if it isn't installed
Diffstat (limited to 'conf.d')
| -rw-r--r-- | conf.d/cstar.fish | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/conf.d/cstar.fish b/conf.d/cstar.fish index d29814f..58e123b 100644 --- a/conf.d/cstar.fish +++ b/conf.d/cstar.fish @@ -31,7 +31,10 @@ function cstar_datetime --on-event fish_prompt --on-event fish_postexec --on-var cstar_colorize cstar_datetime (date "+$cstar_date_format") $cstar_datetime_bg $cstar_datetime_fg end -function cstar_git_query_async --on-event fish_prompt --on-variable PWD --on-variable cstar_git_bg --on-variable cstar_git_fg +function cstar_git_query_async --on-event fish_prompt + if ! command -q git + return + end if test "$(git rev-parse --is-inside-work-tree 2> /dev/null)" != "true" set -Ue $_cstar_git_async set -Ue $_cstar_git_cached_pwd @@ -40,7 +43,7 @@ function cstar_git_query_async --on-event fish_prompt --on-variable PWD --on-var set -l cached_pwd $$_cstar_git_cached_pwd if test "$PWD" != "$cached_pwd" - set -Ue $_cstar_git_async + set -U $_cstar_git_async \ue727 end fish --private --command "set -x __fish_git_prompt_show_informative_status 1 && \ |