2012-02-01 04:37:51 +00:00
|
|
|
#
|
|
|
|
# Displays installation information for not found commands.
|
|
|
|
#
|
|
|
|
# Authors:
|
|
|
|
# Joseph Jon Booker <joe@neoturbine.net>
|
2016-08-04 20:57:16 +00:00
|
|
|
# Indrajit Raychaudhuri <irc+code@indrajit.com>
|
2012-02-01 04:37:51 +00:00
|
|
|
#
|
2011-08-31 03:16:15 +00:00
|
|
|
|
2013-10-01 14:06:57 +00:00
|
|
|
# Load command-not-found on Debian-based distributions.
|
2022-04-01 15:51:37 +00:00
|
|
|
if [[ -s /etc/zsh_command_not_found ]]; then
|
|
|
|
source /etc/zsh_command_not_found
|
2013-10-01 14:06:57 +00:00
|
|
|
# Load command-not-found on Arch Linux-based distributions.
|
2022-04-01 15:51:37 +00:00
|
|
|
elif [[ -s /usr/share/doc/pkgfile/command-not-found.zsh ]]; then
|
|
|
|
source /usr/share/doc/pkgfile/command-not-found.zsh
|
2018-08-01 01:29:01 +00:00
|
|
|
# Load command-not-found on macOS when Homebrew tap is configured.
|
2021-04-30 01:18:22 +00:00
|
|
|
elif (( $+commands[brew] )) \
|
2022-04-01 15:51:37 +00:00
|
|
|
&& [[ -s ${hb_cnf_handler::="${HOMEBREW_REPOSITORY:-$commands[brew]:A:h:h}/Library/Taps/homebrew/homebrew-command-not-found/handler.sh"} ]]; then
|
2021-04-30 01:18:22 +00:00
|
|
|
source "$hb_cnf_handler"
|
|
|
|
unset hb_cnf_handler
|
2012-07-23 19:00:44 +00:00
|
|
|
# Return if requirements are not found.
|
2013-10-01 14:06:57 +00:00
|
|
|
else
|
2012-07-23 19:00:44 +00:00
|
|
|
return 1
|
2011-08-31 03:16:15 +00:00
|
|
|
fi
|