diff options
author | Mario A <marioanacl22@gmail.com> | 2021-02-14 14:44:59 +0100 |
---|---|---|
committer | Marc Cornellà <hello@mcornella.com> | 2021-04-09 21:42:11 +0200 |
commit | 6ae78695efa8c222d716db267041f3ad19114d98 (patch) | |
tree | a5be931f0d61c63bbdb2dacde124ac269b6422f6 | |
parent | b54a6dab9cc9db9196aae5d8bc53ac3956855ecf (diff) | |
download | zsh-6ae78695efa8c222d716db267041f3ad19114d98.tar.gz zsh-6ae78695efa8c222d716db267041f3ad19114d98.tar.bz2 zsh-6ae78695efa8c222d716db267041f3ad19114d98.zip |
feat(command-not-found): add support for Termux (#9666)
-rw-r--r-- | plugins/command-not-found/README.md | 1 | ||||
-rw-r--r-- | plugins/command-not-found/command-not-found.plugin.zsh | 7 |
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 |