1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-18 03:40:08 +00:00

feat(command-not-found): add support for Homebrew on Apple M1 (#9797)

This commit is contained in:
Daniel Wang 2021-04-08 13:59:57 +08:00 committed by Marc Cornellà
parent 9f8801bea6
commit 8b55fb3b60
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B

View file

@ -38,10 +38,13 @@ if [ -f /usr/libexec/pk-command-not-found ]; then
}
fi
# OSX command-not-found support
# macOS command-not-found support
# https://github.com/Homebrew/homebrew-command-not-found
if [[ -s '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh' ]]; then
source '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh'
HB_CNF_HANDLER_SUFFIX="Library/Taps/homebrew/homebrew-command-not-found/handler.sh"
if [[ -s "/opt/homebrew/$HB_CNF_HANDLER_SUFFIX" ]]; then
source "/opt/homebrew/$HB_CNF_HANDLER_SUFFIX"
elif [[ -s "/usr/local/Homebrew/$HB_CNF_HANDLER_SUFFIX" ]]; then
source "/usr/local/Homebrew/$HB_CNF_HANDLER_SUFFIX"
fi
# NixOS command-not-found support