mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-19 05:13:44 +08:00
dff454b1c7
fish by default shows a git-aware prompt. Recall that on macOS, there are two hazards we must avoid: 1. The command `/usr/bin/git` is installed by default. This command is not actually git; instead it's a stub which pops open a dialog proposing to install Xcode command line tools. Not a good experience. 2. Even after installing these tools, the first run of any `git` or other command may be quite slow, because it's now a stub which invokes `xcrun` which needs to populate a cache on a fresh boot. Another bad experience. We previously attempted to fix this by having `xcrun` print out its cache path and check if there's a file there. This worked because `xcrun` only lazily created that file. However, this no longer works: `xcrun` now eagerly creates the file, and only lazily populates it. Thus we think git is ready, when it is not. (This can be reproduced by running `xcrun --kill-cache` and then running the default fish shell prompt - it will be slow). Change the fix in the following way: using sh, run `/usr/bin/git --version; touch /tmp/__fish_git_ready` in the background. Then detect the presence of /tmp/__fish_git_ready as a mark that git is ready. Fixes #10535 |
||
---|---|---|
.. | ||
completions | ||
functions | ||
groff | ||
tools | ||
__fish_build_paths.fish.in | ||
config.fish |