mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 20:29:45 +01:00
command-not-found: speed up call to Homebrew command-not-found (#7740)
By sourcing brew files directly we can achieve a very high speed up. This will not work if the user installed homebrew in a different location than by default.
This commit is contained in:
parent
e65bce8495
commit
ed94e06dda
1 changed files with 2 additions and 4 deletions
|
@ -26,10 +26,8 @@ fi
|
||||||
|
|
||||||
# OSX command-not-found support
|
# OSX command-not-found support
|
||||||
# https://github.com/Homebrew/homebrew-command-not-found
|
# https://github.com/Homebrew/homebrew-command-not-found
|
||||||
if type brew &> /dev/null; then
|
if [[ -s '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh' ]]; then
|
||||||
if brew command command-not-found-init > /dev/null 2>&1; then
|
source '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh'
|
||||||
eval "$(brew command-not-found-init)";
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# NixOS command-not-found support
|
# NixOS command-not-found support
|
||||||
|
|
Loading…
Reference in a new issue