summaryrefslogtreecommitdiff
path: root/plugins/command-not-found/command-not-found.plugin.zsh
diff options
context:
space:
mode:
authorSomeDer <48731521+SomeDer@users.noreply.github.com>2019-03-25 21:19:46 +0000
committerMarc Cornellà <marc.cornella@live.com>2019-03-25 22:19:46 +0100
commitd79415b17d1c730b87bcbf76e691e344c9cb4694 (patch)
treed6b45425c2df55800c92f8dc125d26fbf984723c /plugins/command-not-found/command-not-found.plugin.zsh
parent1e7033d6600823d90cbadcaa7ea696ee7a88afe8 (diff)
downloadzsh-d79415b17d1c730b87bcbf76e691e344c9cb4694.tar.gz
zsh-d79415b17d1c730b87bcbf76e691e344c9cb4694.tar.bz2
zsh-d79415b17d1c730b87bcbf76e691e344c9cb4694.zip
command-not-found: add support for NixOS (#7701)
Diffstat (limited to 'plugins/command-not-found/command-not-found.plugin.zsh')
-rw-r--r--plugins/command-not-found/command-not-found.plugin.zsh7
1 files changed, 7 insertions, 0 deletions
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