diff --git a/plugins/command-not-found/README.md b/plugins/command-not-found/README.md index 5079b1fb5..81f90adfa 100644 --- a/plugins/command-not-found/README.md +++ b/plugins/command-not-found/README.md @@ -32,5 +32,6 @@ It works out of the box with the command-not-found packages for: - [SUSE](https://www.unix.com/man-page/suse/1/command-not-found/) - [Gentoo](https://github.com/AndrewAmmerlaan/command-not-found-gentoo/tree/main) - [Void Linux](https://codeberg.org/classabbyamp/xbps-command-not-found) +- [Alpine Linux](https://pkgs.alpinelinux.org/package/edge/main/x86_64/command-not-found) You can add support for other platforms by submitting a Pull Request. diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh index a85dbfdc3..59a86e7d5 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -74,3 +74,10 @@ if [[ -x /usr/bin/command-not-found ]]; then /usr/bin/command-not-found "$1" } fi + +# Alpine: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/command-not-found/APKBUILD +if [[ -x /usr/libexec/command-not-found ]]; then + command_not_found_handler() { + /usr/libexec/command-not-found "$1" + } +fi