summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/command-not-found/README.md1
-rw-r--r--plugins/command-not-found/command-not-found.plugin.zsh7
2 files changed, 8 insertions, 0 deletions
diff --git a/plugins/command-not-found/README.md b/plugins/command-not-found/README.md
index 1cf4ba66e..f267f0c89 100644
--- a/plugins/command-not-found/README.md
+++ b/plugins/command-not-found/README.md
@@ -28,5 +28,6 @@ It works out of the box with the command-not-found packages for:
- [macOS (Homebrew)](https://github.com/Homebrew/homebrew-command-not-found)
- [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)
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 8fdc8a647..cbf9a0a8e 100644
--- a/plugins/command-not-found/command-not-found.plugin.zsh
+++ b/plugins/command-not-found/command-not-found.plugin.zsh
@@ -53,3 +53,10 @@ if [[ -x /run/current-system/sw/bin/command-not-found ]]; then
/run/current-system/sw/bin/command-not-found -- "$@"
}
fi
+
+# Termux: https://github.com/termux/command-not-found
+if [[ -x /data/data/com.termux/files/usr/libexec/termux/command-not-found ]]; then
+ command_not_found_handler() {
+ /data/data/com.termux/files/usr/libexec/termux/command-not-found -- "$1"
+ }
+fi