diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2019-09-11 18:19:51 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2019-09-11 18:19:51 -0600 |
commit | d676c1553254309beca5bb9a8edb43fbe09a7169 (patch) | |
tree | d0bb04b6487e6fedbb2b2370a894fccd19d4c567 /plugins/command-not-found | |
parent | fb141c2257f648cd29b64cbd3f2ca9123f6e427f (diff) | |
parent | ddd359dd668f448856438304bedfe952d1749efd (diff) | |
download | zsh-d676c1553254309beca5bb9a8edb43fbe09a7169.tar.gz zsh-d676c1553254309beca5bb9a8edb43fbe09a7169.tar.bz2 zsh-d676c1553254309beca5bb9a8edb43fbe09a7169.zip |
Merge remote-tracking branch 'orig/master'
Diffstat (limited to 'plugins/command-not-found')
-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 df62d1f07..1cf4ba66e 100644 --- a/plugins/command-not-found/README.md +++ b/plugins/command-not-found/README.md @@ -27,5 +27,6 @@ It works out of the box with the command-not-found packages for: - [Arch Linux](https://wiki.archlinux.org/index.php/Pkgfile#Command_not_found) - [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) 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 ba1262de6..dd1186e44 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -31,3 +31,10 @@ if type brew &> /dev/null; then eval "$(brew command-not-found-init)"; fi fi + +# NixOS command-not-found support +if [ -x /run/current-system/sw/bin/command-not-found ]; then + command_not_found_handler () { + /run/current-system/sw/bin/command-not-found $@ + } +fi |