feat(cnf): Added support for SUSE-derived operation systems (ZYpp) to CNF plugin (#10508)

* Added support for SUSE and derivatives for command-not-found plugin

* Updated command-not-found documentation to list support for SUSE and derivatives
This commit is contained in:
theVerusDev 2021-12-17 19:02:06 -05:00 committed by GitHub
parent a150d8a7c0
commit f8c76d55a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -29,5 +29,6 @@ It works out of the box with the command-not-found packages for:
- [Fedora](https://fedoraproject.org/wiki/Features/PackageKitCommandNotFound)
- [NixOS](https://github.com/NixOS/nixpkgs/tree/master/nixos/modules/programs/command-not-found)
- [Termux](https://github.com/termux/command-not-found)
- [SUSE](https://www.unix.com/man-page/suse/1/command-not-found/)
You can add support for other platforms by submitting a Pull Request.

View file

@ -60,3 +60,10 @@ if [[ -x /data/data/com.termux/files/usr/libexec/termux/command-not-found ]]; th
/data/data/com.termux/files/usr/libexec/termux/command-not-found "$1"
}
fi
# SUSE and derivates: https://www.unix.com/man-page/suse/1/command-not-found/
if [[ -x /usr/bin/command-not-found ]]; then
command_not_found_handler() {
/usr/bin/command-not-found "$1"
}
fi