From a6050640caf325d018dd35479bb50fd36fd96ada Mon Sep 17 00:00:00 2001 From: Max Gonzih Date: Sun, 7 Dec 2014 13:33:40 +0100 Subject: [PATCH] Support nixos command-not-found handler --- share/functions/__fish_config_interactive.fish | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index 2ace0248d0f5..564cd7915a86 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -224,6 +224,11 @@ function __fish_config_interactive -d "Initializations that should be performed function __fish_command_not_found_handler --on-event fish_command_not_found /usr/lib/command-not-found -- $argv end + # Check for NixOS handler + else if test -f /run/current-system/sw/bin/command-not-found + function __fish_command_not_found_handler --on-event fish_command_not_found + /run/current-system/sw/bin/command-not-found $argv + end # Ubuntu Feisty places this command in the regular path instead else if type -q -p command-not-found function __fish_command_not_found_handler --on-event fish_command_not_found