diff --git a/build/ublue-os-just/05-brew.just b/build/ublue-os-just/05-brew.just index e21cb21..80093a8 100644 --- a/build/ublue-os-just/05-brew.just +++ b/build/ublue-os-just/05-brew.just @@ -28,3 +28,32 @@ install-brew: remove-brew: echo "Removing homebrew ..." /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" + +alias brew-command-not-found := install-brew-command-not-found + +# Suggest Homebrew packages to install when a command is not found +install-brew-command-not-found: + #!/usr/bin/env bash + source /usr/lib/ujust/ujust.sh + if ! brew -h > /dev/null; then + echo "Install Homebrew with ${b}ojust install-brew${n} first!" + exit + fi + HOMEBREW_NO_ENV_HINTS=true brew tap homebrew/command-not-found + sudo tee /etc/profile.d/brew-command-not-found.sh > /dev/null < /dev/null <